L
Linda in Iowa
I have a form just to view records and not allow edits. On the form is an
unbound combo box that shows the first and last name for each record. the
On enter event procedure of the combo box is set to allow edits so what ever
name is selected it will show that record. After selecting a record if I
click on any fields in the record I am able to edit them. I want to set the
form back to not allow edits and can't figure out where to do it. Maybe the
code I have will help.
Private Sub Combo246_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[MbrID] = " & Str(Nz(Me![Combo246], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo246_Enter()
Me.AllowEdits = True ' allows to select record from combo list
End Sub
Private Sub Form_AfterUpdate()
Me.AllowEdits = False
Combo246.Requery
End Sub
Private Sub Form_Current()
Combo246 = MbrID
End Sub
unbound combo box that shows the first and last name for each record. the
On enter event procedure of the combo box is set to allow edits so what ever
name is selected it will show that record. After selecting a record if I
click on any fields in the record I am able to edit them. I want to set the
form back to not allow edits and can't figure out where to do it. Maybe the
code I have will help.
Private Sub Combo246_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[MbrID] = " & Str(Nz(Me![Combo246], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo246_Enter()
Me.AllowEdits = True ' allows to select record from combo list
End Sub
Private Sub Form_AfterUpdate()
Me.AllowEdits = False
Combo246.Requery
End Sub
Private Sub Form_Current()
Combo246 = MbrID
End Sub