K
Karen
I have a form which is opened based on a choice in a combobox on another
form.
On the first form, a person is chosen and a form with that person's record
is opened with
DoCmd.OpenForm "PersonTab", acNormal, , _
"[ContactID]=" & intContactID, acFormReadOnly, , "Old"
I want the record to open in read-only mode. Also on the form's OnLoad I
have
If Me.OpenArgs = "Old" Then
lblStatus.Caption = "Record Locked - Click to Open"
lblStatus.BackColor = 255
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False
ElseIf Me.OpenArgs = "Notes" Then
TabCtl0.Pages(1).SetFocus
Me.AllowEdits = True
Me.AllowDeletions=True
Me.AllowAdditions=True
Me.Details.Form.AllowAdditions = False
Me.Details.Form.AllowEdits = False
Me.Details.Form.AllowDeletions = False
Else
lblStatus.Caption = "Record Open - Click to Lock"
lblStatus.BackColor = 8421376
Me.AllowEdits = True
Me.Details.Form.AllowAdditions = True
Me.Details.Form.AllowEdits = True
Me.Details.Form.AllowDeletions = True
Me.NotesPerson.Form.AllowAdditions = True
Me.NotesPerson.Form.AllowEdits = True
Me.NotesPerson.Form.AllowDeletions = True
End If
No matter what I do, the form opens with record but it can be edited. How
do I lock a record on opening.
I've set a watch to break when Me.AllowEdits changes and I don't see any
problems, it is as though the FormOpen from the original form and the
FormLoaded conditions on the current form have no effect.
form.
On the first form, a person is chosen and a form with that person's record
is opened with
DoCmd.OpenForm "PersonTab", acNormal, , _
"[ContactID]=" & intContactID, acFormReadOnly, , "Old"
I want the record to open in read-only mode. Also on the form's OnLoad I
have
If Me.OpenArgs = "Old" Then
lblStatus.Caption = "Record Locked - Click to Open"
lblStatus.BackColor = 255
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False
ElseIf Me.OpenArgs = "Notes" Then
TabCtl0.Pages(1).SetFocus
Me.AllowEdits = True
Me.AllowDeletions=True
Me.AllowAdditions=True
Me.Details.Form.AllowAdditions = False
Me.Details.Form.AllowEdits = False
Me.Details.Form.AllowDeletions = False
Else
lblStatus.Caption = "Record Open - Click to Lock"
lblStatus.BackColor = 8421376
Me.AllowEdits = True
Me.Details.Form.AllowAdditions = True
Me.Details.Form.AllowEdits = True
Me.Details.Form.AllowDeletions = True
Me.NotesPerson.Form.AllowAdditions = True
Me.NotesPerson.Form.AllowEdits = True
Me.NotesPerson.Form.AllowDeletions = True
End If
No matter what I do, the form opens with record but it can be edited. How
do I lock a record on opening.
I've set a watch to break when Me.AllowEdits changes and I don't see any
problems, it is as though the FormOpen from the original form and the
FormLoaded conditions on the current form have no effect.