sub form total (1 Viewer)

gbanks

Registered User.
Local time
Today, 14:59
Joined
Feb 9, 2000
Messages
161
Need to know if this is possible.. I have a form that has an attached sub form.. Is it possible that if the user enters data in a field on the main form that the it would then require them to enter data in the fields of the attached subform before the can go to a new record.. Thanks for the help..
 

RpbertS

Registered User.
Local time
Today, 14:59
Joined
Feb 14, 2000
Messages
93
yup,

I would assume you'd put some code in the before update event that checks to see if the fields in the subform have any value and if not prompt the user to enter data into those fields.

this is just off the top of my head so it may not work but should help you get started.
in the before update event of main form:
If Form!subform!field.value = "" or isnull(Form!subform!field0 or isempty(Form!subform!field) then
msgbox("Please fill out subform.")
end if

something like that shoould work
 

AccessUser

Registered User.
Local time
Today, 14:59
Joined
Mar 28, 2001
Messages
35
In the Form_BeforeUpdate event on the parent form, you can check if the fields on the subform have data entered. If not display a message then do a docmd.CancelEvent.
 

Users who are viewing this thread

Top Bottom