Open a Form in Read Only or Edit Mode.

skelley

Registered User.
Local time
Today, 17:58
Joined
Jul 11, 2000
Messages
69
Is there a way to have one (1) form open in either read only mode or edit mode? For the moment I have two (2) forms. One with the properties set to read only and the other not. Every time I make a change to one, I have to recreate the other by copying the first and changing the properties.
 
Open your form with code. Use the Data Mode argument of the DoCmd.Open form method:

This opens form in Add Mode:
DoCmd.OpenForm "YourFormName", , , , acFormAdd

This opens form in Read Only Mode:
DoCmd.OpenForm "YourFormName", , , , acFormReadOnly

This opens form in Edit Mode:
DoCmd.OpenForm "YourFormName", , , , acFormEdit

Replace "YourFormName" with the name of your form.

HTH
RDH
 
R. Hicks

Thx for response. I am using an Access Switchboard. Where do I put this code to work?
 
The above did not work from an Access Switchboard or I do not know how to code the "appropriate function" into the switchboard.

Please advise.
 
Open your form with code. Use the Data Mode argument of the DoCmd.Open form method:

This opens form in Edit Mode:
DoCmd.OpenForm "YourFormName", , , , acFormEdit

Replace "YourFormName" with the name of your form.

HTH
RDH

The problem is that when you open a form with this method, you can edit and also add records.

I really like to know how to open with only the edit mode enabled and the add mode desabled.
Is this possible?
 

Users who are viewing this thread

Back
Top Bottom