Code Problem

Jkittle

Registered User.
Local time
Today, 08:09
Joined
Sep 25, 2007
Messages
100
I'm having a small issue with a form/calendar I'm working. When I enter the "unit name" in my "F-Add Reservation" form. It is putting the unit name in twice on the departure date of the "F-Reservation Calendar" form.

I changed some code and now I can't figure out what I did to get this????
 

Attachments

Your zipped file Read-only and when this warning is clicked away nothing comes up! Not much use to anyone trying to help you!
 
Your zipped file Read-only and when this warning is clicked away nothing comes up! Not much use to anyone trying to help you!

Linq - it works for me.

As for nothing coming up - they have the Show Database window unchecked and no form selected in the startup properties so nothing will open.

Hold the shift key down when you open and you should be able to see it.
 
JKittle:

1. Get rid of the DoCmd.DoMenuItem code. You should not be using that. That is only there for backwards compatibility. You should be using the DoCmd.RunCommand acCmdSaveRecord code instead.

2. Change your myset As Object to myset As DAO.Recordset and set a reference to Microsoft DAO 3.x

3. Change this:

For i = 1 To Int(DateDiff("d", myset![ArrivalDate], myset![DepartureDate])) + 1

to this:

For i = 1 To Int(DateDiff("d", myset![ArrivalDate], myset![DepartureDate]))

The extra +1 is causing the duplicate on the last day.
 
Well, you know Bob, I did the holding the <Shift> down routine but still got the Read-Only message! Assumed the app was loaded when the message came up and didn't think to continue to hold the key down while clearing the message box! :D
 

Users who are viewing this thread

Back
Top Bottom