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!

Combo box data to open query

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi all,

I have a combo box with 2 fields, company and company ID. I want to be able to select a company ID via the combo box to open another form.
saves having to input an ID each time into the query, which opens the form.
Any help much appreciated.

Thanks,

Ken
 
You can write a code for Afterupdate Event of the combo box as shown below to open another form...

Private Sub Combo0_AfterUpdate()
DoCmd.OpenForm "Company", , , "[Company ID] = " & Me.ActiveControl.Column(0)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top