You can use the function Get ( LastMessageChoice ) to determine which button in the custom dialog was clicked. It'll return 1, 2, or 3 with 1 being the number of the default button in the dialog.
Thanks for replying so fast Phil.
Doesn't seem to work. There are three buttons on the dialog, change password, OK and cancel. I have tried 1, 2 and 3.
Doesn't seem to have any effect.
Is the login dialog just like a user created dialog?
Still ignores my if statement and opens the database.
Very confused now
I assumed your were trying to cancel a custom dialog. Get ( LastMessageChoice ) only refers to custom dialogs.
One option is to set the file to open with a password that only permits read-only access. That way, cancelling the re-login leaves your file protected.
Another options is to set up your re-login to work without the dialog.
Pop up a custom dialog with input fields for account and password. (Use the password format to echo user's password with bullet characters).
Set these input fields to store their results in global text fields.
Run the Re-login step with calculations that refer to the global text fields for account name and password.
I can log in using a guest account and it works fine.
Appreciate your help again. :smileyvery-happy: