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!

Populate Fields Based on Combo Box Choice 1

Status
Not open for further replies.

useractive

Programmer
Jun 21, 2001
98
US
I'm working on a claims database and have a question on populating fields based on Combo Box Choices.

Relationships: (basic ones we'll be using)
Location - Regional Property Manager (RPM)
RPM - Management Company (MC)
MC - Property Owner (PO)
PO - Location

On the claims form that I am having them fill out, they will fill out most of it, then choose the location the claim happened at through a drop down box which pulls from tblLocation. When they choose the location, I would like it to pull and populate the other 3 fields on the page (RPM, MC, and PO). I'm guessing I need a trigger of some sort but I'm kinda new to this part of it. Would it be something like pulling tblLocation.rpm & tbllocation.po to populate those fields? Any help would be greatly appreciated. Thanks.
 
Do you have the fields in the same table?

If yes you can do a ComboBox that includes all Location columns. Then on the Form's ComboBox property hide the unwanted fields and leave the one you want displayed.
Combo Properties:
Column Count=4 (for 4 columns)
Coulmn Widths=1";0";0";0" (you hide the columns with a 0)

On the ComboBox set After Update and build code.
Example:

Private Sub ComboBox_AfterUpdate()
Me!RPM = Me!ComboBox.Column(0)
ME!MC = Me!ComboBox.Column(1)
ME!PO = Me!ComboBox.Column(2)
End Sub


Let me know if it makes sense.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top