BadSikander
Registered User.
- Local time
- Today, 22:33
- Joined
- Jan 19, 2007
- Messages
- 31
Hello. I'm a bit stuck and would appreciate any help.
I have a table with a Date / Time field and a field to record Activities on that date. The Date / Time field includes some entries with just the date recorded, and others with date AND time recorded. (This is using UK date format by the way).
I then have a query which is set up to allow a search between certain dates and show only the activities for for those dates.
Lastly, I have a form set up with a DATE FROM field and a DATE TO field that allows the user to input the dates to trigger the query.
My problem is as follows: if the user types in the dates wanted the query works perfectly. If the user keeps the default dates in the fields and starts the query it also works perfectly. However, if they use a calendar control to populate the DATE FROM or DATE TO fields, the query results are incorrect.
e.g Although using the calendar to input 19/01/2007 in the DATE TO field will bring up everything prior to 19/01/2007 correctly, all it shows for 19/01/2007 itself are those dates that don't also have times. Any date recorded in the original table in the format "19/01/2007 10:00" or similar is excluded.
Does the calendar control automatically return the date with a certain time attached (e.g. "19/01/2007 00:01") and this is why it exludes certain date & time entries (i.e. because "19/01/2007 10:00" falls after "19/01/2007 00:01"). If so, is there any way to change this?
The DATE FROM and DATE TO boxes on the form are unbound, and I have tried setting the format on them to both SHORT DATE and GENERAL DATE (to include the time). Both settings work if the user types the date, but neither corrects the problem with the calendar control. The calendar itself only appears to input the date (and no time) whatever the setting on the field it populates.
Sorry for the long-winded question. Thanks in advance for any help.
Using Access 2000 with Calendar Control 9.0
I have a table with a Date / Time field and a field to record Activities on that date. The Date / Time field includes some entries with just the date recorded, and others with date AND time recorded. (This is using UK date format by the way).
I then have a query which is set up to allow a search between certain dates and show only the activities for for those dates.
Lastly, I have a form set up with a DATE FROM field and a DATE TO field that allows the user to input the dates to trigger the query.
My problem is as follows: if the user types in the dates wanted the query works perfectly. If the user keeps the default dates in the fields and starts the query it also works perfectly. However, if they use a calendar control to populate the DATE FROM or DATE TO fields, the query results are incorrect.
e.g Although using the calendar to input 19/01/2007 in the DATE TO field will bring up everything prior to 19/01/2007 correctly, all it shows for 19/01/2007 itself are those dates that don't also have times. Any date recorded in the original table in the format "19/01/2007 10:00" or similar is excluded.
Does the calendar control automatically return the date with a certain time attached (e.g. "19/01/2007 00:01") and this is why it exludes certain date & time entries (i.e. because "19/01/2007 10:00" falls after "19/01/2007 00:01"). If so, is there any way to change this?
The DATE FROM and DATE TO boxes on the form are unbound, and I have tried setting the format on them to both SHORT DATE and GENERAL DATE (to include the time). Both settings work if the user types the date, but neither corrects the problem with the calendar control. The calendar itself only appears to input the date (and no time) whatever the setting on the field it populates.
Sorry for the long-winded question. Thanks in advance for any help.
Using Access 2000 with Calendar Control 9.0
Last edited: