Form does not update correctly

Zuzu

Registered User.
Local time
Today, 20:30
Joined
Jun 2, 2015
Messages
29
Hello

Hoping someone with a lot more VBA knowledge than myself can help.

I am building a small scheduling DB, and have been trawling this site to find some examples. Eventually stumbled upon a great concept form that is essentially a booking calendar.

I have attached the database and the user guide that was posted with it.

My problem is that the form does not always update correctly and "draw" the bookings into the calendar form.

In the example attached, you initially see the bookings on the grid view, but if you advance a couple of days and redraw the grid, you cannot see the bookings anymore.

Would anyone be able to have a quick look to see why the form is not working correctly all of the time when advancing days?

Cheers

Zuzu
 

Attachments

The problem is the usual one when query for dates, it needs to be in US format, mm/dd/yyyy.
Try it now, database attached.
 

Attachments

Awesome JHB.

Sorry to bother you again however.... but is there anyway to have it setup for non-americanised dates?

using this format: dd/mm/yyyy
 
Sorry.... i am a moron!

See that it is already working correctly......... been staring at the screen too long today.

For my own learning however, can you explain / tell me what you changed to get it to work correctly?

Thank you very much for the help!

Cheers

Zuzu
 
The below line in the Function DrawGrid was changed. Changes marked with red:
Code:
   sqlU = "SELECT " & cUnitPK & ", " & cColorKeyFld & ", " & _
         cFromFld & ", " & cThruFld & " FROM " & cPeriodRS & _
         " WHERE (" & cFromFld & " <= [B][COLOR=Red]Format([/COLOR][/B]#" & madDisplay(cNumImgPerRow) & "#[B][COLOR=Red],'mm/dd/yyyy') [/COLOR][/B]" & _
         "AND " & cThruFld & " >= [B][COLOR=Red]Format([/COLOR][/B]#" & madDisplay(1) & "#[B][COLOR=Red],'mm/dd/yyyy')[/COLOR][/B] " & _
         "AND (" & EnumUnits & ")) " & _
         "ORDER BY " & cUnitPK
 
Champion.....

Once again JHB, thank you very much!
 
You're welcome, good luck. :)
 

Users who are viewing this thread

Back
Top Bottom