Combo Box - I must be missing something!

  • Thread starter Thread starter saraqpost
  • Start date Start date
S

saraqpost

I am adding a new table to an old database. The new table will store
name and address info for each of our stores. The existing table
stores (no pun intended) the name, ID, name on the sign and the like.

I want to have a user enter and maintain the address information. I
have a combo box whose source is the "old" table - show me the Store ID
and Name, so the user can choose one and enter (or update) the address
information.

It works fine for update. My problem is that if there is NO address
record Yet for the store, I get the address of the first record on the
table.

What is the "trick" here? I am still new, but now capable of writing
some code, but I can't figure out what to write. If "not found" (how
would I know that?), do something (like open the form in Add mode).
But if I open the form in Add mode, I need to make sure I "carry over"
the store the user selected.

This can't possibly be that hard - I'm caught up in my own personal
loop, I guess.

Thanks
Sara
 
You only need to add a "fields" ([streetAddress], [city], [State], [zip]) to
your existing table. Modify your data entry form to include those new
fields.
-Ed
 
I thought that would be poor design and inefficient(?). The address is
used only VERY occasionally (once per month at most), while the "old"
table is linked to many applications and used all day every day. Does
this matter?

Sara


Ed said:
You only need to add a "fields" ([streetAddress], [city], [State], [zip]) to
your existing table. Modify your data entry form to include those new
fields.
-Ed

I am adding a new table to an old database. The new table will store
name and address info for each of our stores. The existing table
stores (no pun intended) the name, ID, name on the sign and the like.

I want to have a user enter and maintain the address information. I
have a combo box whose source is the "old" table - show me the Store ID
and Name, so the user can choose one and enter (or update) the address
information.

It works fine for update. My problem is that if there is NO address
record Yet for the store, I get the address of the first record on the
table.

What is the "trick" here? I am still new, but now capable of writing
some code, but I can't figure out what to write. If "not found" (how
would I know that?), do something (like open the form in Add mode).
But if I open the form in Add mode, I need to make sure I "carry over"
the store the user selected.

This can't possibly be that hard - I'm caught up in my own personal
loop, I guess.

Thanks
Sara
 
Not really. One-to-One tables are seldom needed/desirable. Just modify
your tblStores to include:
StoreID
StoreName
StoreAddress
etc.

All related tables, like employees, inventory, sales will include a StoreID
field and be linked to the tblStores.

-Ed


I thought that would be poor design and inefficient(?). The address is
used only VERY occasionally (once per month at most), while the "old"
table is linked to many applications and used all day every day. Does
this matter?

Sara


Ed said:
You only need to add a "fields" ([streetAddress], [city], [State], [zip])
to
your existing table. Modify your data entry form to include those new
fields.
-Ed

I am adding a new table to an old database. The new table will store
name and address info for each of our stores. The existing table
stores (no pun intended) the name, ID, name on the sign and the like.

I want to have a user enter and maintain the address information. I
have a combo box whose source is the "old" table - show me the Store ID
and Name, so the user can choose one and enter (or update) the address
information.

It works fine for update. My problem is that if there is NO address
record Yet for the store, I get the address of the first record on the
table.

What is the "trick" here? I am still new, but now capable of writing
some code, but I can't figure out what to write. If "not found" (how
would I know that?), do something (like open the form in Add mode).
But if I open the form in Add mode, I need to make sure I "carry over"
the store the user selected.

This can't possibly be that hard - I'm caught up in my own personal
loop, I guess.

Thanks
Sara
 
Back
Top