Generating Form on the run

M

Maracay

Hi guys,

I have a table (A) that I generated dynamically depending on the fields of
another table (B), I want to display the table (A) in a form but, because
this table may have different field each time, I can’t design a form with the
fields of the table in design view, I need to shows whatever fields are in
Table A, in a form (Continuous form), basically what I want is to generate a
form on the run depending on the fields of the table (A).

Thanks
 
L

Larry Linson

Strange, but in a lifetime in the computer business, I have never
encountered a business function that required a solution as you describe.
(And I have faced a lot of strange, sometimes complex, business functions
requiring solutions.)

It is possible, but not trivial, to create a form in code (given that you
give each user appropriate permissions if you are using security).

It would be, however, much easier if you determined the maximum number of
fields to be shown and an agreeable format for the form, then just changed
the Control Source for each of the Controls on the Form, and, if you had
fewer than the maximum, changed the Visible property of the rest to No or
False.

Larry Linson
Microsoft Office Access MVP
 
M

Maracay

Yes, you are right this application is very unique; I have overcome lot of
problems with the help of people from this discussion group. What you say
makes sense, I was checking and there is a property call LEFT that is
basically the distance from the left border to the actual position, also
WIDTH of the box, and Visible or invisible this is all what I need create the
form on the run.

To do this I need to read a table to set up the changes, and apply the
properties I talked above, I think I need to do some programming in one of
the form’s event, but I am not sure in which one, maybe on opening or
load???, may you please give me some light on this

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top