opening different forms when opening database

G

Guest

My be a stupid question but is it possible to open different forms using
different shortcuts for the same Access database?
Daniel
 
G

Guest

Hi Daniel - no question is stupid! Not sure what you mean by opening with
shortcuts but yes, you can open different forms with the same Access
database. Or the same form with different databases. Or if you mean shortcuts
from the Desktop you can open differnt forms by using a combination of the
command line options and macros. Yours - Dika
 
G

Guest

Hallo,
Thanks. I am now using this shortcut to open the database I am using, which
opens the main form:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /wrkgrp "F:\data\
wrkgrp1.mdw" "F:\data\Access database.mdb" /user X. With this shortcut
everyone can open the database without entering a password, in 'Read only'.
This is nice. But the main form is crowded with a lot of things they do not
need to see and cannot use. If I can open 2 different forms with 2 different
short cuts, I want to split the main form and simplify the form used by the X
users. I hope this can be done in a simple way because I think that a
switchboard can solve this but I do not prefer this option.
You suggest using command line options and macro, would you explain how?
Thanks
Daniel
 
K

Keith Wilby

Daniel said:
Hallo,
Thanks. I am now using this shortcut to open the database I am using,
which
opens the main form:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /wrkgrp "F:\data\
wrkgrp1.mdw" "F:\data\Access database.mdb" /user X. With this shortcut
everyone can open the database without entering a password, in 'Read
only'.
This is nice. But the main form is crowded with a lot of things they do
not
need to see and cannot use. If I can open 2 different forms with 2
different
short cuts, I want to split the main form and simplify the form used by
the X
users. I hope this can be done in a simple way because I think that a
switchboard can solve this but I do not prefer this option.
You suggest using command line options and macro, would you explain how?
Thanks
Daniel

You can't specify a specific form to open from the shortcut. You need to
differentiate between users and code your app to open the appropriate form.
You could do this either by having named accounts in your user-level
security (and use the CurrentUser property) or you could harvest the user's
network name on start-up and use that.

HTH - Keith.
www.keithwilby.com
 
G

Guest

Hi Daniel - I use
/x macro --- Starts Access and runs the specified macro. Another way to run
a macro when you open a database is to use an AutoExec macro.

My shortcut is - "C:\Program Files\Microsoft Office\Office10 MSACCESS.EXE"
"G:\Social Services\Finance\Shared Data\BACKEND MDIS\INPUT1.mdb" /x Set
Users.SET 1 /nostartup

In my case the macro is named Set Users and I have 5 options within it -
above is Set 1 - which opens a form with a different name and graphic for
each user. All you would need to do is either have different macros for each
user or just do as I did and combine them. I found it easier this way as it's
easier if they are all together. Yours - Dika
 
G

Guest

Thank you very much, this is exactly what I want. I made a macro and set it
to open the form that I need, then added /x name of the macro to the end of
the short cut. Super, thanks a lot..
Daniel
 
G

Guest

This shortcut is for read only where X is the username:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /wrkgrp "F:\data
wrkgrp1.mdw" "F:\data\Access database.mdb" /user X.

I use another shortcut e.g. for the administrator "C:\Program
Files\Microsoft Office\Office\MSACCESS.EXE" /wrkgrp "F:\data wrkgrp1.mdw"
"F:\data\Access database.mdb" /user admin

I made 2 macro's which open two different forms and added the name of the
macro's to the end of these shortcuts as mentioned by Kernow Girl and it
works for both users.
 
G

Guest

Glad to help. :)

Daniel said:
Thank you very much, this is exactly what I want. I made a macro and set it
to open the form that I need, then added /x name of the macro to the end of
the short cut. Super, thanks a lot..
Daniel
 
K

Keith Wilby

Daniel said:
I made 2 macro's which open two different forms and added the name of the
macro's to the end of these shortcuts as mentioned by Kernow Girl and it
works for both users.

Yes, that will work, I was forgetting about the macro switch as I never use
macros.

Regards,
Keith.
 

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