Creating a macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having a little trouble creating a macro to open a form. Currently i have a main switchboard that allows the user to open each form in edit mode by clicking on the relevent button. I would also like to for the user to be able to open each form in read only mode using a button on the switchboard as well. After much thinking i really don't know where to begin. Also, once i can open each form in both read-only and normal(edit) modes i'd like to be able to create a little warning to let the user know he/she can edit a form whenever a form is opened in the normal mode. Any help with this would be much appreciated,
Thanks
 
I'm having a little trouble creating a macro to open a form.
Currently i have a main switchboard that allows the user to open
each form in edit mode by clicking on the relevent button. I would
also like to for the user to be able to open each form in read only
mode using a button on the switchboard as well. After much thinking
i really don't know where to begin. Also, once i can open each form
in both read-only and normal(edit) modes i'd like to be able to
create a little warning to let the user know he/she can edit a form
whenever a form is opened in the normal mode. Any help with this
would be much appreciated, Thanks.

If you care to use code .....
To open the second form as Read only, code the first form's command
button click event:

DoCmd.OpenForm "FormName", , , , acFormReadOnly

To code the first form command button click event to open the second
form for editing and additions:
DoCmd.OpenForm "FormName", , , , acFormEdit

Code the second form's Load event:
If Me.AllowAdditions = True Then
MsgBox "You can edit this form"
End if
 
Back
Top