If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Force date to the first day of the month
I have a form bound to a table with a text box for clients to enter a date.
The date is formatted to mmmm yyyy because reporting is based only on month and year. Occasionally a client will enter a date including the day. This throws off the Group By in my reporting. Is there a way to force the day to always be 1? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200806/1 |
#2
|
|||
|
|||
Force date to the first day of the month
Occasionally a client will enter a date including the day. Is there a way
to force the day to always be 1? I would recommend using a DateTime field instead of a text field. I think that would solve your problem. -- KARL DEWEY Build a little - Test a little |
#3
|
|||
|
|||
Force date to the first day of the month
On Tue, 17 Jun 2008 19:57:54 GMT, Lee Zard via AccessMonster.com
wrote: I have a form bound to a table with a text box for clients to enter a date. The date is formatted to mmmm yyyy because reporting is based only on month and year. Occasionally a client will enter a date including the day. This throws off the Group By in my reporting. Is there a way to force the day to always be 1? On the form, code the date control's AfterUpdate event: Me.[DateControlName] = DateSerial(Year([DateControlName]),Month([DateControlName]),1) All dates, when entered, will be as of the 1st of that entered month. You'll need to run an update query to change previously entered data. Update YourTable Set YourTable.[DateField] = DateSerial(Year(DateField]),Month(DateField]),1) -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#4
|
|||
|
|||
Force date to the first day of the month
|
Thread Tools | |
Display Modes | |
|
|