A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 04:38 PM posted to microsoft.public.access.forms
gravesk
external usenet poster
 
Posts: 1
Default Why Does My Form Copy Values From My Lookup Box To The Other Recor

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
  #2  
Old April 20th, 2010, 05:03 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Why Does My Form Copy Values From My Lookup Box To The Other Recor

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.

--
Build a little, test a little.


"gravesk" wrote:

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

  #3  
Old April 20th, 2010, 06:13 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Why Does My Form Copy Values From My Lookup Box To The Other Recor

On Tue, 20 Apr 2010 08:38:01 -0700, gravesk
wrote:

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).
--

John W. Vinson [MVP]
  #4  
Old April 20th, 2010, 07:17 PM posted to microsoft.public.access.forms
gravesk[_2_]
external usenet poster
 
Posts: 2
Default Why Does My Form Copy Values From My Lookup Box To The Other R

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

"John W. Vinson" wrote:

On Tue, 20 Apr 2010 08:38:01 -0700, gravesk
wrote:

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).
--

John W. Vinson [MVP]
.

  #5  
Old April 20th, 2010, 08:29 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Why Does My Form Copy Values From My Lookup Box To The Other R

On Tue, 20 Apr 2010 11:17:01 -0700, gravesk gravesk at coned dot com wrote:

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.
--

John W. Vinson [MVP]
  #6  
Old April 20th, 2010, 09:10 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Why Does My Form Copy Values From My Lookup Box To The Other R

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.

--
Build a little, test a little.


"gravesk" wrote:

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

"John W. Vinson" wrote:

On Tue, 20 Apr 2010 08:38:01 -0700, gravesk
wrote:

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).
--

John W. Vinson [MVP]
.

  #7  
Old April 20th, 2010, 10:00 PM posted to microsoft.public.access.forms
gravesk[_2_]
external usenet poster
 
Posts: 2
Default Why Does My Form Copy Values From My Lookup Box To The Other R

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" wrote:

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.

--
Build a little, test a little.


"gravesk" wrote:

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

"John W. Vinson" wrote:

On Tue, 20 Apr 2010 08:38:01 -0700, gravesk
wrote:

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).
--

John W. Vinson [MVP]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.