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

Populating Text Boxes with ComboBox Selection 2

Status
Not open for further replies.

Elvis72

Technical User
Dec 6, 2007
211
US
I have the following combobox:

WorkerID

* WorkerID
* Last Name
* First Name
* Cell Phone
* Email
* Resume Link

The Statement for the combobox is:

SELECT TblResumes.WorkerID, TblResumes.[First Name] & " , " & TblResumes.[Last Name], TblResumes.[Cell Phone], TblResumes.Email, TblResumes.[Resume Link] FROM TblResumes ORDER BY [Last Name];

I have put this in the txtcellphone control source:

=[WorkerID].[column](4)

I have tried putting this in the afterupdate of the WorkerID combobox:

Me.txtcellphone = Me.WorkerID.Column(4)
Me.txtemail = Me.WorkerID.Column(5)
Me.txtresumelink = Me.WorkerID.Column(6)

and no matter what I do all three come up blank?

 
try

Code:
Me.txtcellphone = Me.WorkerID.Column(2)
Me.txtemail = Me.WorkerID.Column(3)
Me.txtresumelink = Me.WorkerID.Column(4)

combo boxes index are zero based
TblResumes.[First Name] & " , " & TblResumes.[Last Name] is only 1 column
 
I expect all you want to do is display the value rather than using code to set the value. If so, just set the control source to refer to the correct column. As pwise stated, columns are numbered from 0.

Duane
Hook'D on Access
MS Access MVP
 
Thanks so much for all of your help!~

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top