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

Is it possible to select a record based on 2 fields in combo box? 1

Status
Not open for further replies.

lwilly

Technical User
Apr 11, 2000
84
US
I would want to give users the ability to select a record in a table with a combo box. Sounds simple enough but the twist is that it takes two fields to make the record unique. Maybe my question should be, is it possible to bind a combo box to two fields?
 
Yes with VBA anything is possible

Dim SQL1 As String
SQL1 = "SQL1 = "Select * From yourTable Where Somefield = '" & Me!Combo1.Column(1) & "' AND Otherfield = '" & Me!Combo1.Column(2) & "';"
Me!Form.RecordSource = SQL1
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top