B
Brook
Good Day all,
I use the following code from a command button to open my form for read
only so that orders are not deleted or modified...
DoCmd.OpenForm FormName:="frmOrders", DataMode:=acFormReadOnly ',
WindowMode:=acDialog
However, I have code below that I use to do a lookup / search within my form
records. How can I do this with the form being opened in ReadOnly? Would I
have to manually lock all records except for this record upon opening the
form?
Private Sub Combo158_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ordnum] = '" & Me![Combo158] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
thanks,
Brook
I use the following code from a command button to open my form for read
only so that orders are not deleted or modified...
DoCmd.OpenForm FormName:="frmOrders", DataMode:=acFormReadOnly ',
WindowMode:=acDialog
However, I have code below that I use to do a lookup / search within my form
records. How can I do this with the form being opened in ReadOnly? Would I
have to manually lock all records except for this record upon opening the
form?
Private Sub Combo158_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ordnum] = '" & Me![Combo158] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
thanks,
Brook