Before Update - Subform

  • Thread starter Thread starter Craig Ferrier
  • Start date Start date
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
 
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.
 
Back
Top