Combo box use

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

Guest

I have a form with a combo box called "Number of Locations:" that allows me to select from 1-10 locations.

What would I need to do to have the selection open a subform to allow entries for the number of locations entered

If 1 is selected see the following -
Location1 Address
Location1 City

If 2 is selected see the following -
Location1 Address
Location1 City

Location2 Address
Location2 City

And so on. There are more fields for the address but I can add those later if you can me with the basics.

I really need some help on how to get started.


Print | Copy URL of this post



.. .
 
Why not have a second table that is linked to your first table, and 'automatically' be open
The fields for your second (address) table:(a) Key ID Address, (B)first table Key #, (c) address, (d) location
This should create a one to many relationship.
 
John

I am confused about how to use the fields "Key ID Address" and "first table key #".

----- John Wood wrote: ----

Why not have a second table that is linked to your first table, and 'automatically' be open
The fields for your second (address) table:(a) Key ID Address, (B)first table Key #, (c) address, (d) location
This should create a one to many relationship.
 
Brian,

When you mention a subform, I presume you mean that it will be on a main
form, and related to it via a OrganisationID or some such? Am I right?
I am not sure whether your reference to Location1 Address, Location2
Address, etc, indicates that you think you will have separate fields for
each address, but if so, this is not correct... you should only have one
Address field, one City field, etc in the table that the subform is
based on, and each Location will be a separate record in this table.
So, if I understand you correctly, you then need to use a mcro or vba
procedure to run an Append Query, which will add the required number of
records wih the applicable OrganisationID to the Locations table (or
whatever your actual names of these fields/tables might be).
 
Back
Top