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!

selecting data from combo box

Status
Not open for further replies.

secretcrowds

Technical User
May 13, 2008
25
GB
Hi guys.

I have a form with a combo box, and then 2 text boxe's underneath. i am trying to make it so when i select an option from the drop down menu on the combo box, that it comes up with the other corresponding data in the 2 text boxes.

the table i am using for data in the combo box is:
'tblcontrolobjectiveid'
ControlObjectiveID - PK
Objective Description

and the table with the data for the 2 text boxes.
1.text box for 'description'
'tblcontrol'
ControlID - PK
ControlObjectiveID - SK
ControlName
Description (field needed)
Procedures
FrequencyofAudit

2.text box for 'procedures'
'tblcontrol'
ControlID - PK
ControlObjectiveID - SK
ControlName
Description
Procedures (field needed)
FrequencyofAudit

sorry if i am a little vague.
if you need any more info, i shall let you know.

thank guys!

"secret crowds rise up and gather
 
Someone seems to be trying to be slick. This is the same question, basically, in
thread702-1472909

For this "different" question, on the AfterUpdate event of the combobox, use the Dlookup function. So in VBA, you'd have:
Me![TextBox1Name].Value = Dlookup("Blah","Blah","Blah = " & Me![Combobox].Value)

Highlight Dlookup, hit F1 and Help will show you how to use Dlookup.

 
Take a look at columns() method.


Ian Mayor (UK)
Program Error
Your lack of planning is not my emergency!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top