Reference to column not working!

Christine Pearc

Christine
Local time
Today, 08:53
Joined
May 13, 2004
Messages
111
Strange problem here on a form. A combobox field, StatusID, has a look-up (SELECT tblStatus.StatusID, tblStatus.Status FROM tblStatus). The column count is 2, with the first column hidden. The name of the field is StatusID.

Since I don't want to show the combo box scroll bars, I've hidden StatusID and referred to it as an unbound field on the form, with the data source set to: "=StatusID.Column(1)". When run, this field displays "#Name?".
Why? It's driving me crazy! :mad:
 
Combo Box

"=StatusID.Column(1)"

Try:
=comboboxname.Column (0)

The column count in the box starts at 0
 
Thanks, Truckname. My reference IS to the name of the combo box, and the reference to the column number the way I've done it is correct. It is interesting to note that, even if I just give a reference to the control, without the column count (i.e. "=SourceID"), it STILL doesn't work - it's like it doesn't see that it even exists!

Clues anyone? :confused:
 
how did you hide the first column?

the way to hide the first field is to have the column count = 2,
and the first column width = 0, not in the query as hidden.

sg
 
The column widths of the StatusID combo box are 0cm;3.995cm. The "0cm" column holds the autokey (1, 2, 3, etc.) and the 2nd column is the text. The text is what I want to see in "=StatusID.Column(1)".

Since posting the last time, I think I've found the solution. My form was using the table as its record source. I've changed it to a query to the table, with everything shown (not hidden). Now, all seems to be okay. But I do not for the life of me understand WHY!!! I didn't create a query in the beginning as I didn't see the need - can't you just get to your data without all this trouble?

ChristineP.S. Sportsguy - See you are from Boston - I'm a transplant to the UK from your neighbour to the south - Nashua, NH. :)
 
Reference to column not working

Hi Pat. The reason I don't want to use the combo box is because the form is for displaying data only, not data entry. I don't want to confuse users by showing the scroll bars. Also (and you might think this silly :o ), I find the internal margins (lines) around controls too close to the text on the left, which makes reading difficult for some of our users. You can set margins on normal text fields, but not on list or combo boxes. I wanted a consistent look.

Christine
 
Aesthetically speaking,

picky, picky, picky.

lucky you, missing all this snow, sleet, freezing rain winter weather! :)

sportsguy
 

Users who are viewing this thread

Back
Top Bottom