auto event

B

BrianMcC

If date is "Monday"
open query........

The "Monday" bit is important because it is doing an "end of week" update

Can someone help please
I am stuck again
 
R

Rick Brandt

BrianMcC said:
If date is "Monday"
open query........

The "Monday" bit is important because it is doing an "end of week"
update

Can someone help please
I am stuck again

If Format(Date(),"dddd") = "Monday" Then ...
or
If Weekday(Date(),vbMonday) = 1 Then...
 
J

John Vinson

If date is "Monday"
open query........

The "Monday" bit is important because it is doing an "end of week" update

Can someone help please
I am stuck again

What do you want to trigger this query? Opening the database? Opening
a form? Turning on the computer <g>?

And why do you want to "open a query"? Is this an action query which
you want to execute, or what?

The short answer is

If DatePart("w", Date()) = 2 Then
<open the query>
End If

but without knowing the context it's hard to suggest more!

John W. Vinson[MVP]
 
Top