Creating forms at runtime

  • Thread starter Thread starter Jean
  • Start date Start date
J

Jean

Hi there, is the following possible within Access?

I have a ComboBox, where the user is asked to select an
amount from 1 - 30. When this is done and the user clicks
OK, another form should open, and provide x sections for
e.g. name, address etc. ( x is the number that the user
chose ). In other words, if the user chooses 5, then there
should be 5 times (name, address, age, as TextBoxes) on
the new form.

Thank in advance!
 
Jean said:
Hi there, is the following possible within Access?

I have a ComboBox, where the user is asked to select an
amount from 1 - 30. When this is done and the user clicks
OK, another form should open, and provide x sections for
e.g. name, address etc. ( x is the number that the user
chose ). In other words, if the user chooses 5, then there
should be 5 times (name, address, age, as TextBoxes) on
the new form.

Thank in advance!

Forms are based on tables or queries.
Each form will hold the contents of one record and a continuous form should
be thought of as a bunch of single forms shown at once.
While it might be possible to hold up to 30 names, etc in one record it
would be a big mistake and would take a good bit of code to implement your
idea.
Each name, address, age should be in a separate record.

You could add x records to the table with a session ID of some sort, then
open a continuous form based on a query that selected for this sessionID.
This would give you what you want.

Normally if you have x records to add you just keep adding them until you
are done.
 
-----Original Message-----



Forms are based on tables or queries.
Each form will hold the contents of one record and a continuous form should
be thought of as a bunch of single forms shown at once.
While it might be possible to hold up to 30 names, etc in one record it
would be a big mistake and would take a good bit of code to implement your
idea.
Each name, address, age should be in a separate record.

You could add x records to the table with a session ID of some sort, then
open a continuous form based on a query that selected for this sessionID.
This would give you what you want.

Normally if you have x records to add you just keep adding them until you
are done.

Hi Mike,

Thanks for the response, but what I want is not really
based on tables/queries. This is a data input form, which
is part of a questionnaire. Therefore, for each user this
subform opens x times, and there he/she should be able to
input the details then.

I am thinking about setting up a table for each person,
with a one to many relationship depending on the number of
x selected, and then entering the info. here.

What I need now though in demonstrating this as a
prototype, is some sort of procedure which will loop x
times and create x sections (in the subform) for filling
in this data.

Hopefully my requirement is more clear now. Thank you
anyway for your assistance.
 
Back
Top