Build form dynamically based on user

M

Mr. Smith

Hi

I have an application that I'm going to distribute to multiple clients. To
avoid several application files I want to build one application file and
build forms dynamically based on the user that's running the application.
The clients have slightly different customization needs. There are also
different numbers of fields that should be visible on the forms, based on
user level.



Is this a suitable approach in Access?



The alternative perhaps is to have a unique sub form for each client and
bind the appropriate subform to the main form, based on user profile. That
will however cause multiple sub forms which might be tedious to keep
"aligned" on shared redevelopment projects.



Any views appreciated



Kind regards

Mr. Smith
 
B

bcap

The technique I mostly use to create "dynamic" forms is put a tab control on
the form with it's Style property set to "None" so that the tabs aren't
visible. Each "alternative" set of controls goes on it's own tab page, so
the only thing you need to do to control how the form appears is to assign
an appropriate value (i.e. page) to the tab control depending on the
relevant criterion (in your case the user).
 
M

Mr. Smith

Thanks bcap

It makes sense and I like the approach.



My application is based on a main form with a tab control with 5 pages. In
my scenario 2 pages will be very different based on user, and 3 pages will
be slightly different (i.e. one combobox/listbox more/less on one client
etc.)



Given that I might in the end have 15 clients with customization needs, I
will end up with a few too many pages perhaps.....



Anyway, thanks for your suggestion, it gave me an idea for another issue
I've been working on.



Kind regards

Mr. Smith
 
B

bcap

Hi again,

It's not worth creating extra pages with lots of duplicated controls where
the only difference is one control. It's easy enough just to make one
control visible or not depending on some criterion. The "entire page"
approach is really for when things are very different.
 

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