If you have a form, frmPassword, which has a command button, cmdOk, that the user has to click on to verify the password and then allow rights as applicable, you can put this line of code in the cmdOK control's OcClick event procedure:
Private Sub cmdOK_OnClick()
' Assume that PasswordVerified is the result of you testing the password entered
docmd.openform "Other Form",,,,,,(PasswordVerified = True)
End Sub
For the form "Other Form", with the Modify Button control, cmdModify, put this line in the form_Load procedure
Private Sub Form_Load()
me.cmdModify.Enabled = me.openargs
End sub
What you are doing here is passing a parameter to the form with the modify button. if the parameter is true then you enable the modify button otherwise disable it.
Another situation would be if the other form were open already.
You would reference the control as
Forms![Other Form]![cmdModify].Enabled = PasswordVerified
ntp
[This message has been edited by ntp (edited 01-18-2001).]