Popup password form

sharpnova

Registered User.
Local time
Today, 05:13
Joined
Jun 9, 2011
Messages
69
http://support.microsoft.com/kb/209871

I have tried to implement Microsoft's example here but there is one critical issue:

the Orders form opens the frmPassword form like this:

DoCmd.OpenForm "frmPassword", acNormal, , , , acDialog

Then the frmPassword sets the value MyPassword to some value then closes

Then the Orders form tries to access Mypassword



I've tried implementing this and this code:

DoCmd.OpenForm "frmPassword", acNormal, , , , acDialog
MsgBox MyPassword

prints an empty box.

This makes sense to me.. since the form closed, the variable is lost.. so how is this Microsoft example supposed to work?

I need it to.
 
In the example they have defined the "MyPassword" variable as:

Public MyPassword

This is done in the module and therefore any value assigned to the "MyPassword" variable would then be available to all other code.
 
Yep I figured that out just before reading your response.

I really dislike using globals, but I guess it's the easiest way here.
 

Users who are viewing this thread

Back
Top Bottom