combo box populating text fields (1 Viewer)

kdt

Registered User.
Local time
Today, 20:12
Joined
Apr 5, 2006
Messages
48
Hi All

Been having trouble setting up a combo box in a form that displays data from the same line in the table into a text box.

I am trying this with a memo field without any luck. I am using a 2 column query for the combo box, the first column contains the name and the second contains the requirements (memo).

I have put in the after update code:

Private Sub CustName_AfterUpdate()

Me!CustReq = Me![CustName].Column(2)

End Sub

Can anyone please shed light on what I'm doing wrong?

Thanks
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 12:12
Joined
Aug 30, 2003
Messages
36,133
Column is zero based, so the second column would be 1.
 

RV

Registered User.
Local time
Today, 20:12
Joined
Feb 8, 2002
Messages
1,115
Column numbering starts at 0 (zero)

Try

Code:
Me.CustReq = Me.CustName.Column(1)

RV
 

kdt

Registered User.
Local time
Today, 20:12
Joined
Apr 5, 2006
Messages
48
phew, got it now, I'd stupidly not changed the column count from 1 to 2. Thanks for all your help :D
 

Users who are viewing this thread

Top Bottom