Date Issue

  • Thread starter Thread starter DS
  • Start date Start date
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
 
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.
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top