Why Does My Form Copy Values From My Lookup Box To The Other Recor

G

gravesk

Hi -
I am using Access 2003, and am not very familiar with Access or its
terminology. I am not at all familiar with VB.

I created a form from a query, and everything is generally working fine.

One of the fields on the form is based on a lookup table for location. I
have assigned a default value of 1 (which translates to NOT CHOSEN), and
that's how everything shows up when I go into the form. I assigned the
default both in the originating table and in the box on the form itself.

However, when I change the first record to a different value (say, 2 which
translates to QUEENS), then all of the other records now show up as QUEENS
when I page through them.

How do I stop the chosen lookup value from being propogated through the rest
of my database?

Many thanks,
Kristin Graves
 
K

KARL DEWEY

How do I stop the chosen lookup value from being propogated through the rest
of my database?
I doubt that it is. Open the table in datasheet view and check value in the
field of those records.
You probably did not bind the form object to the table. You did not say
what kind of object it is - combo, listbox, textbox.
 
J

John W. Vinson

One of the fields on the form is based on a lookup table for location. I
have assigned a default value of 1 (which translates to NOT CHOSEN), and
that's how everything shows up when I go into the form. I assigned the
default both in the originating table and in the box on the form itself.

However, when I change the first record to a different value (say, 2 which
translates to QUEENS), then all of the other records now show up as QUEENS
when I page through them.

Check the properties of this combo box ("lookup") on the Form. Almost
certainly its "Control Source" property is blank; this means that the combo
box is not associated with any field in your table, but instead is just
displayed on the form. Since it's associated with the form and not with the
table, you'll get this effect (it makes no difference which record you're on
if the combo box doesn't have any connection with the record).
 
G

gravesk

thank you for your replies.

Karl is correct that the chosen value is not truly propagated through the
data. However it does appear to be on the form, and I want the form to show
the default value of "NOT CHOSEN" unless something else has been chosen.

I checked the data properties of the box on the form and this is what I see:

control source = location (one of the fields in the query that is my source
for the form)
row/source type = table/query
row/source = locations (name of lookup table)
bound column = 1
default value = 1
enabled = yes
locked = no

What should my next step be? Again, thanks for your help!
Kristin
 
J

John W. Vinson

thank you for your replies.

Karl is correct that the chosen value is not truly propagated through the
data. However it does appear to be on the form, and I want the form to show
the default value of "NOT CHOSEN" unless something else has been chosen.

I checked the data properties of the box on the form and this is what I see:

control source = location (one of the fields in the query that is my source
for the form)
row/source type = table/query
row/source = locations (name of lookup table)
bound column = 1
default value = 1
enabled = yes
locked = no

Are there other fields in the table/other controls on the form? A Default
Value will not be applied or added to the table unless the record is "dirtied"
by editing some other field.
 
K

KARL DEWEY

row/source = locations (name of lookup table)
Wrong - Needs to be something like this --
SELECT [Locations].[ID], [Location] FROM [Locations] ORDER BY
[Locations].[Location];

Set the following --
Column Count - 2
Column Widths 0"; 2.5"

The width of 2.5 should be adjusted to display the location names.
 
G

gravesk

Thanks for your help. There is a drop-down arrow in the row/source box that
is giving me the names of tables and queries. There are also three little
dots to the right of the drop down arrow, and if I click there I receive the
question "You invoked the query builder on a table. Do you want to create a
query based on the table?" Do I want to do the query or type the info below
into the box that lists the existing tables/queries?

KARL DEWEY said:
Wrong - Needs to be something like this --
SELECT [Locations].[ID], [Location] FROM [Locations] ORDER BY
[Locations].[Location];

Set the following --
Column Count - 2
Column Widths 0"; 2.5"

The width of 2.5 should be adjusted to display the location names.

--
Build a little, test a little.


gravesk said:
thank you for your replies.

Karl is correct that the chosen value is not truly propagated through the
data. However it does appear to be on the form, and I want the form to show
the default value of "NOT CHOSEN" unless something else has been chosen.

I checked the data properties of the box on the form and this is what I see:

control source = location (one of the fields in the query that is my source
for the form)
row/source type = table/query
row/source = locations (name of lookup table)
bound column = 1
default value = 1
enabled = yes
locked = no

What should my next step be? Again, thanks for your help!
Kristin
 

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