Required Fields on Subforms

G

Guest

Hi

I have my main form (Active Clients) and on it i have various subforms.

I have a save button that when clicks it refereshs a list box and disableds
the sub-forms so they cant be altered. (Staff have to click an edit button
to enable the forms to be altered)

I also need this button to check the following fields on different sub forms
to ensure there is information in the fields. If there is no information it
needs to give an error box and then return them to that particular field on
whatever subform its on.

(THESE FIELDS ARE ON A SUB FORM CALLED – “ONI CORE 1 FORMâ€)
Surname
First
Date of Birth
Sex
Address
Address2
Suburb
Pcode

(THESE FIELDS ARE ON A SUB FORM CALLED – “ONI CORE 2 FORMâ€
Other Country
Language
Source of Referral
Indigenous Status

(THESE FIELDS ARE ON A SUB FORM CALLED – “ONI FP FORMâ€
Score 1
Score 2
Score 3
Score 4

All Sub-Forms have there own source table.

Im not the best at VB code but am learning. Hope I have given enough
information if anymore required please ask

Thanks

Andrew
 
G

Guest

To write code to access the subforms you will need to call it via

Me.Controls("name of subform").form.controls("Name of field")

Note that it will only give you the values in the selected record of the
subform if you are looking to check on multiple records you will probably
need to look into the recordsetclone object.

Hope this helps and let me know if I can provide more assistance.
 

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