Accept input for unknown number of options

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

Guest

Can someone suggest a way to capture more than one response to a given data
element. For instance, let's say on the form you want to capture the
addresses for a given person. Due to various reasons, in my situation, a
person might have any number of personal, business and leisure addresses.
Without setting up any artificial constraints is there a way to carture this
information. If one were to use scripting any hints of how to go about it
will be deeply appreciated.

Thx
Hadavidi
 
You need a child table to the table that has the people in it. Then you can
have as many addresses as you want for that person. It will need to be
linked to the person table with some kind of identifier.

You can then create a sub form for the form you use for persons to enter and
view their various addresses.

I don't know what level of knowledge in Access you have, so I am not sure
how to proceed with the response.
 
That would be a one-to-many relationship.

You need to build a second table to store "addresses" This table neds to
include the customer number or some key that can be related back to the
customer table.

In your form, you'd have a main form with all the customer data, then you'd
have a second subform for addresses where the user could enter one or more
addresses.

Personally, I'd include an 'address type' field in my table and maybe even a
"primary" or "mailing" checkbox that the user checks to indicate which
address should be the main address.

The closest example I could think of in the Northwinds database would be the
"Categories" form. Think of the category as the person, and the products as
the addresses.
 
My worry is about how to take the inout from the form. For instance, when
someone is entering the information in a form, let's say they enter one
address, then they see there is another address. Or may be another and
another. So, for the person entering the information via the form, my idea
is that we should be able to provide a way to take any variations in the
number of addresses i.e. for a person within the database someone may have
one address, while some may have 15 addresses. So, would you suggest having a
sub-form? My question I believe may be a bit vague but ideally what I am
thinking should happen is that when a user enters the information, a pop-up
should come up and ask would like to add another address. Depending on the
response appropriate action should kick in. What would be the script code
look like to perform this.

My knowledge is basic to intermediate. In terms of forms, it has been a
while since I played with them. Thanks for your help.

Hadavidi
 
My worry is about how to take the inout from the form. For instance, when
someone is entering the information in a form, let's say they enter one
address, then they see there is another address. Or may be another and
another. So, for the person entering the information via the form, my idea
is that we should be able to provide a way to take any variations in the
number of addresses i.e. for a person within the database someone may have
one address, while some may have 15 addresses. So, would you suggest having a
sub-form? My question I believe may be a bit vague but ideally what I am
thinking should happen is that when a user enters the information, a pop-up
should come up and ask would like to add another address. Depending on the
response appropriate action should kick in. What would be the script code
look like to perform this.

My knowledge is basic to intermediate. In terms of forms, it has been a
while since I played with them. Thanks for your help.

Hadavidi
 
My worry is about how to take the inout from the form. For instance, when
someone is entering the information in a form, let's say they enter one
address, then they see there is another address. Or may be another and
another. So, for the person entering the information via the form, my idea
is that we should be able to provide a way to take any variations in the
number of addresses i.e. for a person within the database someone may have
one address, while some may have 15 addresses. So, would you suggest having a
sub-form? My question I believe may be a bit vague but ideally what I am
thinking should happen is that when a user enters the information, a pop-up
should come up and ask would like to add another address. Depending on the
response appropriate action should kick in. What would be the script code
look like to perform this.

Simply use a continuous Subform, sized to show (at least) two
addresses. The user will see the first two addresses, and if you leave
the navigation bar on the form, will see how many addresses there are
in all; and will be able to scroll up and down to look at those that
are out of view. After adding a new address they'll automatically be
put into the input "new" record for yet another new address.

John W. Vinson[MVP]
 
Back
Top