Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using different *.MDW

Status
Not open for further replies.

LuRSH

Programmer
Aug 2, 2001
63
US
Hi Folks! :-D

In the warehouse that I work at I’ve about five small systems built in Access (2000). Just one holds “classified information” [bigglasses]. Being this way I’ve built a *.mdw just for that system and I use /wrkgrp to assign it to the application during startup (Windows shorcut).

The problem is when I finish the application and start the other non-classified ones I’ve being asked for password. I didn’t change the original system.mdw but, just to be sure, I’ve copied it from another system and still the user-name-password box comes up when I start any of the other systems. I’ve tested it in another computer (copied only database.mdb and secured.mdw) and, surprise-surprise, same problem!

Do I have to assign the other systems to use system.mdw or do I have to have the secured system unassigned?

Thanks in advance for your help!
Luciano R. Humberto
IT Specialist - Support :)I
The Ryan Companies
 


if my memory serves me right you can include the path to the mdw in the command line but I haven't done that for ages so let me check MSDN for the correct info & get back to you


Jo

Ps apologies now if it takes me a while but I go for half an hour of badminton at 3:15pm

so it may be after 4.00 before I get back to you

 
JoanneM must be in Euro? It is only ~~9:00 AM U.S. Eastern time. She is correct in the command line assignment for the .MDW. The basic issue here is that you are ALWAYS using some .MDW file. It is 'always' the last one you used. So, when you set up security for the one db, and included it on the command line, you "joined" it. To "re-join" the default security file, you CAN accomplish it in many ways. An easy way is to use a desktop icon w/ hte command line parameter for each db. This is reasonably workable for the few dbs you note. An alternative might be to have a new db which simply acts as a 'switchboard' for all of your Ms. A. dbs. Have this db contain ONLY the mechanisims for accessing the other dbs. A combo box or a series of command buttons could be used to set the command line parameters for each of the production dbs.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks Jo & Michael for your help!

I like Michael's sugestion of a commom switchboard but it would involve a little more work once not everybory uses all systems...

By now I have to use the simplest solution, as you guys recomend, to unassign the application, or put the environment back to System.mdw before quiting the secured application.

Is there a command line or something like that to revert the system?

Thanks again! Luciano R. Humberto
IT Specialist - Support :)I
The Ryan Companies
 

Lursh

Just got back after my badders & customary cuppa and what
was sneaking in the boot with the raquets my old access 2 book open on security changing on the fly
( jammy or what- cleared out some books from my house up north on Tuesday and this turned up) So I am porting it over to to 2000 and testing it will post when successfull - but it looks dinky so...

talk to you soon

jo
 
Thanks again Jo!

I myself didn't find a easy/secure way yet...

By the way, where are you "emailling" from? 'm in Florida/USA (12:00pm now) but it seems you are getting ready to supper already!

Best regards! Luciano R. Humberto
IT Specialist - Support :)I
The Ryan Companies
 

Hi there

Location wise I am in what is called the garden of england

Well almost in Church Crookham in Hampshire it's only 17:10 here (retiring to watch Buffy the Vampire slayer a 18:00)

Just checked out the books suggestion darn thing is designed for a 16 bit platform but I have a sneaky rememberance of pointing via editing a setting somewhere.

Seek & ye shall find

talk to you soon

jo
 
Jo

Did you ever get an answer?

BTW the Garden of England is Kent not Hants!!
 
Hi Hookery,

No, I've never got the answer. I'm just using /WRKGRP in the shortcut for each system. Didn't find a more elegant way yet (but didn't do much research on that either. You know, the system is performing and there is no much time for refining this kind of detail).

Regards,

Luciano R. Humberto
IT Specialist - Support :)I
The Ryan Companies
 
Hi Lursh,

Do you find that if you launch the DB from Explorer you are not prompted? It's OK if you launch the shortcut but say someone uses Explorer. Defeats the object.
 
Hi again Rookery,

I use a little trick to avoid that. I got this one from
"Mastering Microsoft Access 2000 Development" by Alison Balter - Sams ISBN - 0-672-31484-3 (very 'tip full' book, come in handy many times! [reading]).


I call the following line in the Open_Form procedure of my Switchboard Form. Naturally you don’t need to have a Switchboard. You just have to be sure to call the function before any sensitive part of your system is accessed.

If Not fncAuthorizedUser Then
DoCmd.Quit
--------x---------

And this is the function that checks out the authorization. If the authorization fields (User / Password) were not filled the pretense-user [censored] will be caught and access to the system will not be granted! Nice, isn't it [wavey3]?

Function fncAuthorizedUser()
' Original Function Copied from
' Mastering Microsoft Access 2000 Development
' Alison Balter - Sams ISBN - 0-672-31484-3
Dim cat As ADOX.Catalog
Dim usr As ADOX.User
Dim strPassword As String

Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
Set usr = cat.Users(CurrentUser)
On Error Resume Next
usr.ChangePassword "", ""
If Err.Number = 0 Then
strPassword = InputBox("You Must Enter a Password Before Proceeding", _
"Enter Password")
If strPassword = "" Then
DoCmd.Quit
Else
usr.ChangePassword "", strPassword
End If

End If
fncAuthorizedUser = True
End Function


Best Regards!

BTW: I'm using Access 2000 and Microsoft ADO Ext. 2.6 for DDL and Security as a Avaiable Reference for my forms. I don't know if you'd be able to use the necessary system information in other Access versions.

Luciano R. Humberto
IT Specialist - Support :)I
The Ryan Companies
 
Thanks Luc. Bit of a bummer though as I'm still using DAO so doubt if this will work. Will just have to keep on looking. Cheers again.
 
... but ... but ... if you are using Ms. A. 2K, ADO is available, so it is just wheather YOU are willing to implement the 'gift horse'. AFAIK, the only requirement is to include the ADO lib in your references.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
I'll give it a go to see if its as easy as that.
Hope you find a job soon!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top