Hi
I have a control box with this code in the On Change event:
The "frmGapEdit" opens but to the FIRST record on that form's record source, not the value of the control box.
This is the other form's record source:
The field on the other form that I want to set the filter on is called [Gap#].
I'm positive that I'm missing something REALLY simple (I usually do!). Any ideas?
Jim DeGeorge![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)
I have a control box with this code in the On Change event:
Code:
Private Sub ctlGapNumSelect_Change()
On Error GoTo Err_ctlGapNumSelect_Change
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmGapEdit"
stLinkCriteria = "[Gap#]=" & "'" & Me![ctlGapNumSelect] & "'"
DoCmd.Close acForm, Me.NAME, acSaveYes
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ctlGapNumSelect_Change:
Exit Sub
Err_ctlGapNumSelect_Change:
MsgBox Err.Description
Resume Exit_ctlGapNumSelect_Change
End Sub
This is the other form's record source:
Code:
SELECT tblGaps.* FROM tblGaps WHERE tblGaps.DateClosed Is Null;
The field on the other form that I want to set the filter on is called [Gap#].
I'm positive that I'm missing something REALLY simple (I usually do!). Any ideas?
Jim DeGeorge
![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)