Macro to require data entry in subform if higher form is populated

M

Maggie

My goal is to insure users put in at least one record in the subform before
being able to move on. I've attempted a macro for this (see below):

[frmSummary]![PromoID] Is Not Null And [sfrmLinkage]![PPGID] Is Null

Basically, if they fill in promo ID and DON'T fill in PPGID, I will be
canceling event and throwing up a msgbox. I think it sees the potential new
record (next blank line) in the subform as the null value, therefore, it's
always running the condition.
Any thoughts???
Thanks.
 
S

Steve Schapel

Maggie,

I assume the expression you gave in your post is a Condition in the
macro. It doesn't seem right to me. What event are you using for this
macro? Is sfrmLinkage a subform of frmSummary form? If not, can you
say what they are? And what is the setting of the Link Master Fields
and Link Child Fields properties of the subform?
 

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

Top