MS_Access_Amature
Registered User.
- Local time
- Today, 15:21
- Joined
- Nov 10, 2010
- Messages
- 56
I want to change FORM2 properties from when you click a button in FORM1 so you can't edit, delete, or change anything until you click the Edit button. What am I doing wrong?
Code:
Private Sub ButtonCompany_Click()
On Error GoTo MyErrorControl
DoCmd.OpenForm "MyCompanyInfo"
Forms!MyCompanyInfo!Form.AllowEdits = False
Forms!MyCompanyInfo!Form.AllowAdditions = False
Forms!MyCompanyInfo!Form.AllowDeletions = False
DoCmd.Close acForm, Me.Name, acSaveNo
Exit Sub
MyErrorControl:
Select Case Err.Number
Case 0
Resume Next
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical, "ButtonCompany_Click ERROR"
Resume Next
End Select
End Sub