Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditonal expression NOT WORKING

Status
Not open for further replies.

kimmole

Technical User
May 9, 2002
49
GB
conditonal expression NOT WORKING
how do i?......

DatePart(&quot;m&quot;,[Forms]![PSWRDCHKFRM]![Text4])=1 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])>28<30 And [Forms]![PSWRDCHKFRM]![ARCHIVE DONE]=0

IF THE DATE IS JANUARY AND THE DAY IS GRETER THAN THE 28TH BUT LESS THAN THE 30TH AND THE CHECK FIELD ON THE FORM IS OFF (IE 0) THEN OPEN A FORM

DatePart(&quot;m&quot;,[Forms]![PSWRDCHKFRM]![Text4])=1 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])>28<30 And [Forms]![PSWRDCHKFRM]![ARCHIVE DONE]=0

SAME AGAIN TO STOP THE PRESENT MACRO IF THE ABOVE IS TRUE

DatePart(&quot;m&quot;,[Forms]![PSWRDCHKFRM]![Text4])=1 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])>30 And [Forms]![PSWRDCHKFRM]![ARCHIVE DONE]=1

IF THE DATE IS JANUARY AND THE DAY IS GREATER THAN THE 30TH AND THE CHECK IS ON RUN A QUERY


Please help with the syntax ...... i cant seem to get it to work


thanks in anticipation.... kimbo:))))))) mr macro....sorry, not clever enough for code.
 
DatePart(&quot;m&quot;,[Forms]![PSWRDCHKFRM]![Text4])=1 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])> 28 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])<30 And [Forms]![PSWRDCHKFRM]![ARCHIVE DONE]=0

IF THE DATE IS JANUARY AND THE DAY IS GRETER THAN THE 28TH BUT LESS THAN THE 30TH AND THE CHECK FIELD ON THE FORM IS OFF (IE 0) THEN OPEN A FORM

DatePart(&quot;m&quot;,[Forms]![PSWRDCHKFRM]![Text4])=1 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])> 28 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])<30 And [Forms]![PSWRDCHKFRM]![ARCHIVE DONE]=0

SAME AGAIN TO STOP THE PRESENT MACRO IF THE ABOVE IS TRUE
this seems right
DatePart(&quot;m&quot;,[Forms]![PSWRDCHKFRM]![Text4])=1 And DatePart(&quot;d&quot;,[Forms]![PSWRDCHKFRM]![Text4])>30 And [Forms]![PSWRDCHKFRM]![ARCHIVE DONE]=1

IF THE DATE IS JANUARY AND THE DAY IS GREATER THAN THE 30TH AND THE CHECK IS ON RUN A QUERY
 
thank for that i'll go and try it right now!

now fro another date problem.....

end of month?

i'm looking for a way to trigger a macro at start on the last day of any given month...
ideas please.....


thanks in anticipation.... kimbo:))))))) mr macro....sorry, not clever enough for code.
 
i've sorted my last problem..... simple really..
just use 1st of the month as the trigger instead and bob's yer uncle! ...it works!!

now however i need to rename a table with the a date stamp so that each time the code (er sorry...macro) runs it renames a table with a date or number consecutive with previously renamed tables.

ie.
rename table xxx to zzz&(date())



thanks in anticipation.... kimbo:))))))) mr macro....sorry, not clever enough for code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top