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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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?
 
Back
Top