G
Guest
I am running this event from a control on a sub-form that refers to another
sub-form. (I have a main form, subform and subform)
The innermost subform is in Datasheet view. This code does what I want, but
it open the sub-form in a separate window. I'd like to modify it so that it
simply either display not found message (no problem there) or displays the
row that matches the search criterion in the datasheet view of the subform,
with the cursor flashing on that row.
Here is my code:
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_ppt_search"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command26_Click:
Exit Sub
Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click
End Sub
Any help would be great!
sub-form. (I have a main form, subform and subform)
The innermost subform is in Datasheet view. This code does what I want, but
it open the sub-form in a separate window. I'd like to modify it so that it
simply either display not found message (no problem there) or displays the
row that matches the search criterion in the datasheet view of the subform,
with the cursor flashing on that row.
Here is my code:
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_ppt_search"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command26_Click:
Exit Sub
Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click
End Sub
Any help would be great!