Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form/Subform Help

Status
Not open for further replies.

Djbell

IS-IT--Management
Apr 22, 2002
175
GB
Hi All

I have a form that has a subform in Datasheet view. What I want is a text box on the main form that looks through the records of a particular field on the subform and gives a statement in red saying "Missing Values" if there is any records that do not have values in them for that particular field.

Regards

Djbell
 

one way would be to put in the oncurrent event of the form

iif(isnull(forms!formname!subformname.form!txtboxname) ,me!missingvalues = "missing values", me!missingvalues = "")
me.repaint

but this would slow up the form a little

another way which is far less resuource hungry is to make your subforms data be sourced by a query
add an extra field to the query called say
DISP_Missing:iif(len(tblname!fieldname) =0) ,"Missing DATA", "")
this will then populate the information you want into the the subform
then all you have to do is reference the subform field - DISP_Missing from the unbound txtbox and job done


hope this helps

jo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top