OfficeClosed Function /Holidays Module

Breakpoint is still on there.
I typed in the immediate window: ? Plusworkdays(#12/24/2007#,2)

And it highlights the same lines again where it has the breakpoint.
If Weekday(PlusWorkdays, vbMonday) <= 5 And _
IsNull(DLookup("[HoliDate]", "tblHolidays", _
"[HoliDate] = " & Format(PlusWorkdays, "\#mm\/dd\/yyyy\#;;;\N\u\l\l"))) Then

I typed in the immediate window: ? Plusworkdays(#12/21/2007#,2)12/26/2007
then hit the F8, it just takes me line by line through the code and then again highlights the same three lines above together.
 
I had changed the table name before having these things happen so it's still not picking things up. It seems to go over that last line. is dd supposed to have the / \ surrounding it?
(I know little about this so just curious.)
Thanks!
 
The:
If Weekday(PlusWorkdays, vbMonday) <= 5 And _
IsNull(DLookup("[HoliDate]", "tblHolidays", _
"[HoliDate] = " & Format(PlusWorkdays, "\#mm\/dd\/yyyy\#;;;\N\u\l\l"))) Then
...is really all on one line since we have the "_" continuation character at the end of the first two lines. Each time you press the F8 key the highlighting should move to the next line to execute. It should only highlight the intNumDays = intNumDays - 1 line twice and skip over it 3 times.
 
I've uploaded it as a zip file.
tblHolidays is in there.
Form2 is the form where I'm putting the info. (A customer ID of 1 can be put in then order date, then invoice date.
No attachment Mel. Try it again.
 
It seems to be working Melanie.
 
Last edited:
well dang..... sorry about that
I did run in the immediate window:
? Plusworkdays(#12/24/2007#,2)

it correctly gives me 12/27/07.

But when I open my form: and type in 12/24/07 on the orderdate, when I tab to invoicedate it goes to the vba code and highlights those 3 lines again.

I'll go attach some screenshots.
 
Remove the breakpoint. Just click outside the margin again to remove it.
 
Bless you and thank you for sticking with me and helping me figure this out.
 
you might want to pull that back off. Unless its bogus info, your accounts table looks to have some personally identifiable information.
 
Bless you and thank you for sticking with me and helping me figure this out.
You are certainly welcome Melanie. Everyone has to start somewhere. The more you play with VBA the better you will get and the more control you will have over your applications.
 
I'm sure making a mess of things today....
I deleted my message but the attachment is still in one of your replies to me.
How do I get rid of it?
Thanks.
 
RG's gonna have to do that.

don't worry about it, healthy levels of paranoia takes years to hone. plus we're a pretty honorable bunch.
 
Hi Melanie,
I deleted the attachment I had. All is now OK.
 

Users who are viewing this thread

Back
Top Bottom