B
Barry A&P
I have a unbound combo box used to find a record on a My form F_Parts
it uses the rs.FindFirst "[PartNumberID] code that the Wizard Supplies on
the after Update,
I also have code on my forms "On Current" that keeps the combo displaying
the correct info if navigation buttons are used Me.SelectByPNID_Combo =
Me.PartNumberID
the issue i am now having is Code from my F_search that opens this form uses
a Where statement to open this form so my F_Parts is opened "Filtered" and
the find record combos no longer work and display wierd data that is
misleading.
Here is the code from my search Form
Private Sub OpenParts_Click(Cancel As Integer)
On Error GoTo Err_OpenParts_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "F_Parts"
stLinkCriteria = "[PartNumberID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenParts_Click:
Exit Sub
Err_OpenParts_Click:
MsgBox Err.Description
Resume Exit_OpenParts_Click:
End Sub
Is there a way to remove the filter so my Parts form can still use the
lookup Combos if a user wants to explore other records
maybe on Form Activate?
I have tried a few things but my form resets to the first record when i
remove filters with VBA
Any help would be appreciated..
it uses the rs.FindFirst "[PartNumberID] code that the Wizard Supplies on
the after Update,
I also have code on my forms "On Current" that keeps the combo displaying
the correct info if navigation buttons are used Me.SelectByPNID_Combo =
Me.PartNumberID
the issue i am now having is Code from my F_search that opens this form uses
a Where statement to open this form so my F_Parts is opened "Filtered" and
the find record combos no longer work and display wierd data that is
misleading.
Here is the code from my search Form
Private Sub OpenParts_Click(Cancel As Integer)
On Error GoTo Err_OpenParts_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "F_Parts"
stLinkCriteria = "[PartNumberID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenParts_Click:
Exit Sub
Err_OpenParts_Click:
MsgBox Err.Description
Resume Exit_OpenParts_Click:
End Sub
Is there a way to remove the filter so my Parts form can still use the
lookup Combos if a user wants to explore other records
maybe on Form Activate?
I have tried a few things but my form resets to the first record when i
remove filters with VBA
Any help would be appreciated..