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

Combo Boxes

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have 2 tables. In 1 I have a project with its name and description. In another table I have other info pertaining to the project. In this combo box I would like to find the projects(which I can do) but when a particular project is chosen I need to display all of its information in multiple text fields. In these text fields if no information is there I will also need to update this info. How do I go about doing this? I have been working on this for 2 days now and I am about to lose my mind so if someone could give me a hint it would be appreciated. Thanks
 
one possible method is to create a form with the combobox and a subform on it. For the subform use a query that ties the Project field to that selected in the combobox

Example assumptions
Main Form Name = frmMain
SubForm Name = frmSub
Field containing Project info = ProjectCode
ComboBox name on frmMain = cboProject

(i.e. in the query used for the subform use this as the criteria for the ProjectCode field: = Forms!frmMain.cboProject)

then in the AfterUpdate( ) event for cboProject, perform a form refresh
Me.Refresh
or if that doesn't update the data in the subform perform a requery on frmSub
Me.frmSub.Requery
and then Me.Refresh

PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top