subform update mainform

lizzylabbe81

New member
Local time
Tomorrow, 08:22
Joined
Nov 9, 2011
Messages
1
Hello All! I am quite new to access database and have a query. Thank you for your help in advance. I have a main form (newIncident) and a sub form(animalincidnet)- the number of animals entered into a text in the subform (animalincidnet) must match the total number of animals previously entered in the main form (newIncident). If these do not match a warning message pops up- this all works however, if the text box in the subform is blank and try to press save I get a debug error- i've tried using nz but this doesn't work. does anyone have an alternative suggestion?
Thanks
 
You can cancel the save if that textbox in the subform is blank and pop up a message to tell the user to enter the number of animals before saving.

So your Save button code would check for the number of animals, see a sample code below.

If Not IsNull(Me.TxtBoxNameForAnimalNumber) = True Then
MsgBox "Enter the number"
Else
'the code to save the record
End If
 
I wonder why you are asking for confirmation again. Sounds like a normalization problem here.
 

Users who are viewing this thread

Back
Top Bottom