Conditional (Null Value) Macro won't run

P

Pete Merenda

My goal is for users to populate five key fields on a form after creating a new record. If they do not, I want them to be prompted before moving to a new record. After making the changes I thought were correct, I can't produce any prompt at all

On table props, design: I set five fields to 'required', yes. Then set 'Allow Null Values' to no

Wrote a macro: condition: IsNull([Field1]) Or IsNull([Field2]) Or IsNull.... (didn't include the word "If" anywhere
actions: 1) runcommand \ stop loading page; 2) Msgbo

Attached macro to form properties: 'Before Update', and 'On Close' for safe measure. When tesing, I'm not prompted at all

Other items: I know the data in my Db does not conform with 'new' required fields. After making 'required' changes, I clicked through ('Yes') and had Access continue to evaluate

Having a hard time pinpointing the problem since there are multiple variables in play...but the functions seems simple

Any suggestions are appreciated.
 
S

Steve Schapel

Pete,

I would recommend you take a different approach to this. Scrap the
macro altogether. Also, set the Required property on these fields in
table design back to No. I am not sure about the 'Allow Null Values',
that's a new one on me... what version of Access are you using? Anyway,
I would put this in the Validation Rule property of those fields:
Is Not Null
.... and then use the Validation Text property do define the message to
display if the user tries to save a record with nothing entered.
 

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

Similar Threads


Top