Limit To List - table showing incorrect data

P

p-rat

I have a combobox to where if a value isn't listed you can add it. On
my form this works correctly and when the record is pulled or when
looking in the underlying table the data isn't correct. Would anyone
know why this might be? The values are pulling from a query and the
query looks good. This combobox also autofills the next text box on
the form.

Example:

If I look for location "Dallas" on the list and it's there it will
autofill the next box with a number assigned to Dallas. If I look for
a location and it isn't there I can type in a location and when
hitting tab it will pop up a form that I enter the new location again
and then a number assigned to this new location. When hitting 'ok' it
will ask 'Do you want to add this value to the list?". This seems to
work correctly.

In the underlying location table it looks good. In the underlying
query for this location table it looks good. When I look at the table
for the data collection of the form (linked table to SQL Server) the
location are wrong. They are numbers instead of text. It looks as
though they might be the row or something of the location in a table.
Do I have something set to the wrong column or ???
 
J

John W. Vinson

In the underlying location table it looks good. In the underlying
query for this location table it looks good. When I look at the table
for the data collection of the form (linked table to SQL Server) the
location are wrong. They are numbers instead of text. It looks as
though they might be the row or something of the location in a table.
Do I have something set to the wrong column or ???

My guess is that you're yet another victim of Microsoft's "Lookup Field"
abomination. This causes confusion because what's stored in the table is a
number, but what you *see* is the text value (from the lookup table).

Is this in fact a Lookup Field in your table definition?
 
P

p-rat

OK. After reading your message I was able to search through some posts
and found that I needed to change my 'Bound' property to column(1).
This fixed one of my problems. It is now storing the correct value for
the Location in my database. The autofill value that gets sent to an
unbound text box is not storing the correct value. It stores 0. Any
clues on this issue?
 
P

p-rat

I got it. I appreciate your help. Just sometimes getting me pointed in
the correct direction helps. Thanks allot.
 
J

John W. Vinson

OK. After reading your message I was able to search through some posts
and found that I needed to change my 'Bound' property to column(1).
This fixed one of my problems. It is now storing the correct value for
the Location in my database. The autofill value that gets sent to an
unbound text box is not storing the correct value. It stores 0. Any
clues on this issue?

Not without knowing how you did the "sending". Do note that the Column()
property is zero based, so =combobox.Column(1) is actually the second field in
the combo's rowsource - there is an infuriating discrepancy between the
convention for the Bound Column property (1-based) and the Column property
(0-based).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top