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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|