Dmonkyking
Technical User
Hi, I'm trying to make a message box to appear when my my database is first open if a Table contains certain criteria. The way I've been doing it is by using Expression Builder to run a RunMacro command to open a message box macro when the condition was met. The way I was trying to code it was like this:
DCount("[Pmel ID]","Test","[In Pmel] = False") And
DCount("[Pmel ID]","Test","[Date Due Cal] < Date()-7")
Obviously I'm not doing this right and I'm quite new at setting this stuff up. By the code above, you can see that I want a message box to pop up when the "Over Due Cal" field is 7 days before todays date or earlier and when the "In Pmel" is also False. I'm trying to make the macro run when the two field's above criteria is met, but it's proving difficult. As I'm pretty new to bulding expressions and using VB I was hoping someone could help me out and explain it in idiot for me to understand
Thanks alot.
DCount("[Pmel ID]","Test","[In Pmel] = False") And
DCount("[Pmel ID]","Test","[Date Due Cal] < Date()-7")
Obviously I'm not doing this right and I'm quite new at setting this stuff up. By the code above, you can see that I want a message box to pop up when the "Over Due Cal" field is 7 days before todays date or earlier and when the "In Pmel" is also False. I'm trying to make the macro run when the two field's above criteria is met, but it's proving difficult. As I'm pretty new to bulding expressions and using VB I was hoping someone could help me out and explain it in idiot for me to understand