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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

from Header, check value of a field in a detail section

Status
Not open for further replies.

CharlieT302

Instructor
Mar 17, 2005
406
US
Hi Folks,

I have a combo box in my form Header that displays customer names. When a name is chosen, I want to generate a message if the County field, in the Detail section, is blank.

In the "AfterUpdate" event of the combo box, I have tried:
If IsNull([frm Referral primary].[County Code]) Then GoTo NoCounty Else GoTo Move_On

The IsNull command is obviously wrong. How can I correct it?
 
Perhaps something like this ?
If Trim([frm Referral primary].form![County Code] & "") = "" Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I appreciate the help but I don't think we are on the same wavelength. I don't need to trim extra spacing.

I want to select a customer from a drop down box which is in the Header.

The detail section displays the customer's name and county. Sometimes, the county field is empty. When this happens I want to generate a message.

The code I used is bombing out seemingly because it does know to look at the detail section. Basically, from the
header section, I need to validate if a field in the Detail section is blank.

thanks
 
Simply this ?
If IsNull(Me![County Code]) Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry, Its not working:

My code is:
If IsNull(Me![County Code]) Then GoTo NoCounty Else GoTo CompleteRecord



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top