D
doyle60
The code below is placed on the Got Focus property of a form with a
datasheet sub. If the underlying form is open, it will go to the
record that has the focus of the popup datasheet. It works. But the
problem is that it filters the underlying form. I don't want it to
filter. I have a method for taking this filter off, but it isn't
working here. I get a data mismatch error. But the data is a match,
coming from the same table.
Can anyone suggest how to take the filter off, preferably something
added to the code at the bottom, to avoid this data mismatch.
Thanks,
_______________________
If IsOpen("ChargeBackHeaderfrm") Then
On Error GoTo Err_Command49_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ChargeBackHeaderfrm"
stLinkCriteria = "[CBID]=" & Me![CBID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command49_Click:
Exit Sub
Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click
End If
_______________________
Matt
datasheet sub. If the underlying form is open, it will go to the
record that has the focus of the popup datasheet. It works. But the
problem is that it filters the underlying form. I don't want it to
filter. I have a method for taking this filter off, but it isn't
working here. I get a data mismatch error. But the data is a match,
coming from the same table.
Can anyone suggest how to take the filter off, preferably something
added to the code at the bottom, to avoid this data mismatch.
Thanks,
_______________________
If IsOpen("ChargeBackHeaderfrm") Then
On Error GoTo Err_Command49_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ChargeBackHeaderfrm"
stLinkCriteria = "[CBID]=" & Me![CBID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command49_Click:
Exit Sub
Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click
End If
_______________________
Matt