Date Issue

D

DS

I have a form in Access that only comes up on Mondays. Well not yet at
least. Howdo I tell Access to bring that form up according to the Date
on the computer?
Thanks
DS
 
J

Jackie L

On the On Click event of your button, you could try:

If Weekday(Date())=2 then
DoCmd.OpenForm "frmMonday"
Else
DoCmd.OpenForm "frmNotMonday"
End If

Hope this helps.
 
O

Ofer

If the question what kind of code you use then
if day(date())=2 then
docmd.openform "MyForm"
endif

But if the question Where you run the code from, then you have to be more
specific about the all process.
Do you open the mdb and then you expect the code to run or you want the mdb
to run on monday auto.
etc
 
D

DS

Jackie said:
On the On Click event of your button, you could try:

If Weekday(Date())=2 then
DoCmd.OpenForm "frmMonday"
Else
DoCmd.OpenForm "frmNotMonday"
End If

Hope this helps.

:
Thanks, I figured it out, I used the Date() then I have a second Textbox
on the Form with =Weekday([FirstTextBoxName]) and this does the trick!
Thanks
DS
 
D

DS

Ofer said:
If the question what kind of code you use then
if day(date())=2 then
docmd.openform "MyForm"
endif

But if the question Where you run the code from, then you have to be more
specific about the all process.
Do you open the mdb and then you expect the code to run or you want the mdb
to run on monday auto.
etc

:
Thanks, see my previous post. I have the form based on a Query and I
have the working. Except......now i have to time it as well!
Thans
DS
 
Top