Batch file to open a form

rikklaney1

Registered User.
Local time
Today, 11:08
Joined
Nov 20, 2014
Messages
157
Another goofy question... I have a database being used by about ten people and some of them use different forms. Rather than have ten databases opening different forms when opened can I make a batch file tell which form to open when run? From what I've seen on google it looks possible but I can't seem to get it right. Any help? Tried this



start "" "C:\Program Files (x86)\Microsoft Office\Office15\MSAccess.EXE"/ ro "ofrmr5applet" "C:\User\PMSC 2016v15.accdb"


and this



start "" "C:\Program Files (x86)\Microsoft Office\Office15\MSAccess.EXE"/ cmd docmd.openform "ofrmr5applet" "C:\User\PMSC 2016v15.accdb"
 
why cant you just have 10 FrontEnds, 1 backend?
then they can open any form they want.
 
That's what I have right now. I just thought it might be easier when I do updates to only have to do them in one place rather than maybe several different places. Just thought that way might be easier on me if it was possible.
 
You also have to write vba code. If not solved later i will send it but not home right now. I don't know it out of my head anymore.

I use it for nightly scripts to update backend and import somz csv files from other programs. I also like to only maintain one front end
 
Confusing post. What has updating to do with opening different forms? Maintenance is hell if you create additional frontends - keep the stuff together sp long as it shares something (data in backend).

AS to opening: you can drag a form onto the desktop, and the db will open on that form when you double-click it.
 
Only 1 frontend with the macros inside ... easier then for every user go to his desk, open db in edit mode and drag and drop form on desktop. What if form changes ?


Only my opinion, there are always different ways to get to the thing you want
 
I agree that you can do it all with a single front end. I do the same thing now.

My preferred method is to have a logon form when the database opens. It would also be possible to grab the Windows user ID. This would allow you to skip the Logon form and auto log in.

After the user is logged in, the user ID is used to lookup a field in the user table to see what form to open as their start form.


I like to keep it simple. I would also avoid having to create a custom command line. This just makes deployment more difficult.

I would not use 10 macros, one for each user. I would store the data in a table.

By having it all table driven and no special command line need, then adding and removing users, and changing a user's startup form is as simple data updates to a table.
 

Users who are viewing this thread

Back
Top Bottom