Microsoft
Software
Hardware
Network
Question : if statement in a macro
Can you write an if statement in a macro-
I have tried If TimeValue(Now)) Between #01:00# and #9:00# then
docmd.Openquery "qryUpdate1"
ElseIf TimeValue(Now()) Between #1:00# and 9:00# then
docmd.Openquery "qryUpdate2"
EndIf
I want first update between 1 and 9 am
and the second update between 1 and 9 pm
also do not think my code is right.
thank you
Answer : if statement in a macro
Between doesn't work in VBA, try this instead
If Hour(Now()) >= 1 And Hour(Now()) < 9 Then
DoCmd.OpenQuery "qryUpdate1"
ElseIf Hour(Now()) >= 13 And Hour(Now()) < 21 Then
DoCmd.OpenQuery "qryUpdate2"
End If
Random Solutions
Server healtness
Include C++ header files in .Net Application
MAC Os 10.4 Startup problem.
Can You Remote Access PowerShell?
IIS 7 leaking private ip via https
windows 2008 Domain controller for 200 AD
Detect ESC key press in VSTO
Configuring Wireless Computer Authentication with Certificates in Windows 7
Air 2.0 Native Process: Why does process.standardOutput.rea
dUTFBytes seem to overflow?
how to insert with vb.net a date time column in sql server