Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Build form dynamically based on user

Geek News

Build form dynamically based on user
"Mr. Smith" <nospam[ at ]nospam.com> 12/10/2008 9:00:39 PM
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



Re: Build form dynamically based on user
"bcap" <bcap[ at ]nospam.nowhere> 12/11/2008 7:39:42 AM
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).

"Mr. Smith" <nospam[ at ]nospam.com> wrote in message
news:erpjdpwWJHA.1188[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> 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
>
>
>


Re: Build form dynamically based on user
"Mr. Smith" <nospam[ at ]nospam.com> 12/11/2008 8:07:16 AM
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



"bcap" <bcap[ at ]nospam.nowhere> wrote in message
news:4940c3bd$0$10536$db0fefd9[ at ]news.zen.co.uk...
[Quoted Text]
> 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).
>
> "Mr. Smith" <nospam[ at ]nospam.com> wrote in message
> news:erpjdpwWJHA.1188[ at ]TK2MSFTNGP05.phx.gbl...
>> 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
>>
>>
>>
>
>


Re: Build form dynamically based on user
"bcap" <bcap[ at ]nospam.nowhere> 12/11/2008 9:11:04 AM
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.


"Mr. Smith" <nospam[ at ]nospam.com> wrote in message
news:%23g969d2WJHA.4280[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> 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
>
>
>
> "bcap" <bcap[ at ]nospam.nowhere> wrote in message
> news:4940c3bd$0$10536$db0fefd9[ at ]news.zen.co.uk...
>> 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).
>>
>> "Mr. Smith" <nospam[ at ]nospam.com> wrote in message
>> news:erpjdpwWJHA.1188[ at ]TK2MSFTNGP05.phx.gbl...
>>> 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
>>>
>>>
>>>
>>
>>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net