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

Default Value in a Combo Box

Status
Not open for further replies.

eknotts

Programmer
Dec 23, 2002
10
0
0
US
I have a Form (Job) and a Sumform (Job Details). The Subform has all the component records that make up the Job. The Job form has a Combo Box that allows the selection of the "Job Color"; in the Job Details for the various components of the Job, I have a Combo Box that allows the user to select a color (which may be different from the Job Color)for a specific component of the Job. I would like to make the "Default Value" of that Combo Box for the specific component to be the "Job Color" selected in the "Job Form". How do I do this?
 
Hi!

Open the form that you are using as a subform in design view and put this code in the Form_Current event procedure of the form:

If IsNull(Me!cboDetailColor) = True Then
Me!cboDetailColor.Value = Me.Parent!cboJobColor.Value
End If

hth
Jeff Bridgham
bridgham@purdue.edu
 
Hi!

Open the form that you are using as a subform in design view and put this code in the Form_Current event procedure of the form:

If IsNull(Me!cboDetailColor) = True Then
Me!cboDetailColor.Value = Me.Parent!cboJobColor.Value
End If

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top