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

linking a combo box to a form

Status
Not open for further replies.

CLEUTA

Programmer
Feb 1, 2005
13
RO
Hello everyone
Here is what i want to do: i have a form(invoice) in wich i've entered a combobox. The control source of the combobox is a table(products). I want when i choose a product to open a form connected to the table products.

Hope you anderstand and thanks in advance.
 
Hi Cleuta,

I use the following in the afterupdate event a unbound list box. Maybe you could alter it for your combo box

' Find the record that matches the control.
Dim Rs As Object

Set Rs = Me.Recordset.Clone
Rs.FindFirst "[name of lookup Field] = '" & Me![Name of ListBox] & "'"
If Not Rs.EOF Then Me.Bookmark = Rs.Bookmark


Ian Mayor (UK)
Program Error
Programming is 1% coding, 50% error checking and 49% sweat as your application bombs out in front of the client.
 
Have a look at the 4th argument of the DoCmd.OpenForm method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top