|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Date problem with specific dates
Hi all,
I am having a bit of a problem with a specific set of dates. I have a form that uses multiple combo boxes (4) to filter down to a unique record, with the final combo box being a date field. Also on the form is a subform that displays the list of records as they are being filtered. As each combo box is selected the list grows smaller. The problem I am having is that when selecting the date combo box, if the date is either 10/12/yy (dd/mm/yyyy format) or 12/10/yy the record disappears. It appears to only be these two day/month combinations and the year doesnt matter. If it has that combination of day and month the record disappears off the list. Any ideas as to why this is happening. The AfterUpdate event of the date combo box uses these lines to populate the subform, which is basically identical to what is used for the other combo boxes. . . strSQLSF = strSQLSF & " cbm.Sample_Date = #" & cboSampleDate & "#" Me!SelectItemSubForm.LinkChildFields = "" Me!SelectItemSubForm.LinkMasterFields = "" Me!SelectItemSubForm.LinkChildFields = "Item1;Item2;Item3;Sample_Date" Me!SelectItemSubForm.LinkMasterFields = "Item1;Item2;Item3;Sample_Date" Me.RecordSource = strSQLSF Me.Requery Thanks for any help you may be able to give |
|
#2
|
|||
|
|||
|
I was having some crazy things happening with some dates. I ended up having to define everything as a Short Date. Also, one of the fields was being populated on default as Now() but the format of the field was Short Date. That threw it all off because the actual long date and time was what was being stored. I changed the default to Format(Now(), "Short Date"). I would suggest triple checking everything to make sure it is stored as a Short Date and that it is defined that way.
|
|
#3
|
|||
|
|||
|
Further complications
Hi,
It is really strange. There is only one table in the dB and the date is manually entered and has the short date input mask on. I have since noticed another strange event occurring. Where I previously thought the event was restricted to those with 10 and 12 in the day and month, I have noticed that it happens to a few others where the day and month are separated by 2, ie 05/07, 11/13, 02/04... I am really confused by this now. |
|
#4
|
|||
|
|||
|
I ended up changing the field to a text field with a dd/mm/yy input mask and when I need to validate it I have a variable and use IsDate and then CDate(txtDate) to check it and perform validation.
Unfortunately couldnt determine the cause of the problem |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Date problem with specific dates |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|