Re: Manipulating dates
- From: fredg <fgutkind@xxxxxxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 15:18:56 -0700
On Fri, 28 Sep 2007 20:32:24 -0000, Denis wrote:
I have a date field in a database. I have been given forms to be
printed out.
The problem is that the form requires the date to be printed out in 3
seperate parts. In the form day month and year.
All numberic with the year in the form of 07 06 05 etc instead of
2007
2006 2005 etc.
set the format property of the date control to:
dd/mm/yy
Another issue this form has brought is that I have a membership
number
field as an 8 digit string.
The form requires the number to be printed one charachter per box so
I
need to split the string.
Is the above possible and how would I go about it.
Thanks
Denis
Add 8 unbound text controls to your report.
An easy way to add 8 controls is to add 1. Select it Copy and paste.
Select these 2, Copy and Paste, Select these 4, Copy and paste and you
now have 8 controls.
Delete all of their labels. Size the controls to whatever height and
width will work. Name them "Text1", "Text2", etc... "Text8".
Position them in order, left to right.
Space them using Format + Horizontal Spacing Make Equal. Align them.
Set their Border Style to Solid, Border Width to 1 pt size.
Code the Report Section's Format event.
If they're in the Detail section, then:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim intX As Integer
Dim intY As Integer
intX = 1
For intX = 1 To Len([FieldName])
Me("Text" & intX) = Mid([FieldName], intX, 1)
Me("Text" & intX).Visible = True
Next intX
' To hide extra boxes or to show empty boxes
For intY = intX To 8
Me("Text" & intY).Visible = False ' To hide extra boxes
' Me("Text" & intY) = "" ' To show the box but delete the text
Next intY
End Sub
Set the control's FontSize to one that will match the size of the
box. Set the Alignment to Center.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.
- Follow-Ups:
- Re: Manipulating dates
- From: ruralguy via AccessMonster.com
- Re: Manipulating dates
- References:
- Manipulating dates
- From: Denis
- Manipulating dates
- Prev by Date: Re: Repost: "Officelinks" Problem On Menu Bar Under Access 2007
- Next by Date: Re: Stripping VAT out and then adding it back - figures do not match
- Previous by thread: Re: Manipulating dates
- Next by thread: Re: Manipulating dates
- Index(es):
Relevant Pages
|