Combo Box list item to Textbox

Ceejay64

Bass Playin' Biker Chick
Local time
Yesterday, 21:12
Joined
Oct 2, 2002
Messages
74
This is making me nuts.
I have scoured this forum, and tried everything I've seen as far as writing this event, but it's still not working. All I want to do is take items in the list of information in the selected row of a combobox and pass it to a text box.

I'm stuck with Access 2007, and if I am understanding it right, this should work in an AfterUpdate event on the combobox (shift is the textbox, employee is the combo and the item I want is the 3rd col):

Me.Shift = Me.Employee.Column(2)

I've tried it a bunch of different ways, yet nothing is working... what am I doing wrong??:confused:

Thanks!!
 
Remember that column numbers are zero based.

.Column(2) is actually the third column

try doing Debug.Print Me.Employee.Column(2)

to see what is being returned. but essentially your syntax is correct.
 
Actually, the OP stated that he wanted the third column, so his syntax is exactly right!

Do you have any code that runs? Code does not run in 2007/2010 unless your database resides in a folder that has been declared a “trusted” location.

To trust your folder, click:
  1. Office Button (top left)
  2. Access Options (bottom of dialog)
  3. Trust Center (left)
  4. Trust Center Settings (button)
  5. Trusted Locations (left)
  6. Add new location (button)
Linq ;0)>
 
i did the trusted location add thing, but nothing changed. I still get the same error msg (
"Procedure declaration does not match description of event or procedure having the same name").

I never had this kind of trouble with Access 2003 or 2000

(ps - that would be HER syntax. LOL)
 
how do I do (or where do I put) the debug.print me.employee.column(2) thing?
 
allrighty, then...
i made a brand new form exactly like the old one, entered the same code in the afterupdate event, and it works perfectly fine on the new form.
go figure.
Thanks for the help, guys! don't know why it wasn't working on the other one, but the delete key works just fine. :)
 

Users who are viewing this thread

Back
Top Bottom