Filling an unbound text field from a combo box

Rusty

Registered User.
Local time
Today, 15:43
Joined
Apr 15, 2004
Messages
207
How do I get Access 2000 to fill an unbound text field [Activity Name] from values from the 2nd column in a combo box? [cboActivity area]

I've tried setting the control source of the text field to:

=[cboActivity area].column(2)

as advised in a reference book, but when I click away from it it changes to:

=[cboActivity area].[column2]

and does not work.

Help!! :(
 
Rusty,

Firstly the left most column is actually referenced as Column(0) not Column(1)

Also try changing field to "=cboActivity area.Column(1)"

Cheers

Bob
 
Rusty, as Bob says, the column count starts at 0. This is true for almost everything in Access: arrays, fields, etc.

You can change the base level to 1, although I don't know if this refers only to VBA, by using the Option Base 1 statement at the top of a module.

=[cboActivity area].[Column](1)
 

Users who are viewing this thread

Back
Top Bottom