Before Update - Subform

C

Craig Ferrier

I have a subform(donations) within a form(donors) (linked by child/master
fields)

If a new donation record is started, there are 4 fields that are required
before the user can go to another record. (donor or donation)

Can you point me in the right direction on how to implement this.

Everything that I have tried doesnt seem to work.

I am using :

If IsNull(me.Date) then
MsgBox " text ", vbcritical, "title"
docmd.gotocontrol "Date"
End If

I have these for each of the 4 field on the suborm before update event.

Again if anyone can point me in the right direction it would be appreciated.

Craig
 
A

Allen Browne

Open your table in design view.
Select the field that must have an entry.
In the lower pane, set the Required property to Yes.
Repeat for the other 3 fields.

BTW, if your Donation table has a DonorID (foreign key to Donor.DonorID),
consider marking this field required as well. This will prevent a donation
being entered in the subform when the main form is at a new record.
 

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