before update Q

M

mcnewsxp

using one of those continuous forms as a subform.
i want to make sure a certain field in the row contains a value before the
next insert can occur.
i am using the defore update event and setting focus back to the control if
this field is null.
it works fine once.
the second time it adds the new row anyway.
must be a better way.
?

TIA.
mcnewsxp
 
M

mcnewsxp

using one of those continuous forms as a subform.
i want to make sure a certain field in the row contains a value before the
next insert can occur.
i am using the defore update event and setting focus back to the control
if this field is null.
it works fine once.
the second time it adds the new row anyway.
must be a better way.
?

i add cancel = true and it now works.
 
D

Dirk Goldgar

mcnewsxp said:
using one of those continuous forms as a subform.
i want to make sure a certain field in the row contains a value
before the next insert can occur.
i am using the defore update event and setting focus back to the
control if this field is null.
it works fine once.
the second time it adds the new row anyway.
must be a better way.
?

Please post the code you're using? Are you setting the BeforeUpdate
event procedure's Cancel argument to True, as you should to cancel the
update?
 
Top