List Box changes values in every record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form to fill in a Customer table. One of the fields is "Source",
which is a bound field from my table, also called "Source". When I add a new
customer, EBAY is my default value for my Source field, but I sometimes have
customers who locate me through other means (which are listed on my Source
table). When I click the drop-down list on my Customer form and select a
different option, I've noticed that it changes the value for every record
(past and new) to the new value. I've exhausted my Access books, and MS help
has not been at all helpful! I'm assuming I have something checked somewhere
that says "if the value for this changes, change it for all records", but I'm
darned it I can figure out what I need to change.

HELP!
 
first of all, it's not a good idea to name a table the same name as a field
in that table, suggest you change one or the other. second, i assume the
form is bound to the Customer table. the Source table should *not* be
included in the form's RecordSource. there must be a field in the Customer
table, where the source value is stored - i'll call it "FoundAt". in the
form, the FoundAt field should be the ControlSource of the listbox control.
the Source table should be used in the RowSource of the listbox.

and btw, if you have a Lookup field for the source field in the Customer
table, i strongly recommend you get rid of it. for details, see
http://www.mvps.org/access/lookupfields.htm

hth
 
Then I guess I don't understand the concept of Access. I thought unique
types of data should be stored in individual tables and relationships between
tables help you when you're filling in data. For instance, I have a customer
database which includes typical customer info, and a product database which
contains my prodcuts for sale. However, I don't want to have to remember the
name of all the hundreds of products I have and hand-type them into every
customer order. I want a bound list box so that I can pick each item a
customer has ordered. Am I not correct in this? So what's the difference
between that and having a separate table that lists the sources of my
customers? I don't mean to be dense, but I really don't understand the
problem.

I've been going back through all the MS offered Access training because it's
been years since I've used Access, and it looked to me like that is what they
were saying to do.

Maybe I need a beginners forum?
 
For instance, I have a customer
database which includes typical customer info, and a product database which
contains my prodcuts for sale.

i'll assume you mean you have a Customers *table*, and a Products *table*.
you're correct that "unique types of data" (often referred to as
"entitites") belong each in their own table, and each table should have a
primary key. two tables may have a direct relationship - such as tblOrders
and tblOrderDetails; or an indirect relationship - such as tblCustomers and
tblProducts, which are linked by tblOrders.

an example of a direct relationship:

tblOrders (parent table)
OrderID (primary key)
OrderDate

tblOrderDetails (child table)
DetailID (primary key)
OrderID (foreign key from tblOrders)
Item
Quantity

tblOrders
OrderID OrderDate
1 11/15/05
2 11/15/05

tblOrderDetails
DetailID OrderID Item Quantity
1 1 A 5
2 1 B 8
3 2 B 1
4 2 C 3
5 2 A 5

if the above matches your concept of tables/relationships, then you're fine
on that point. based on your original post, your problem seems to be that
the Source control in your form is not bound to a "source" field in your
Customer table. i made a few assumptions, and explained how to address that
problem. if i'm not on target, then post back with specific details of your
setup, such as: what are the primary and foreign key fields of the Customer
table and the Source table. what table the form is bound to. what field the
Source control in the form is bound to. what is the RowSource of the listbox
in the form. and use the "real" table, field, form, control names please, do
i don't have to "make them up" when i post back with a suggested solution.

hth
 
THANK YOU! I finally understand what I did wrong and have fixed the problem!
I had linked the "Source" field instead of the "SourceID" field, which is
the primary key in my CustomerSource table. I changed the linking, and
everything works fine now!

By the way, thank you for reminding me that table names should not mimic
fields within those tables - I had forgotten that point and the MS training
never covered it.

I apologize for my confusing terms - I've been trying to work 2 jobs and go
through manuals and training to put together this database, and my thinking
isn't always coherent!

THANK YOU again for your help!

(By the way, my name is also Tina!)
 
Back
Top