I’m trying to filter a bound form according to some fields but without success… I am doing exactly what I always did ( I already did something exactly in the same way and this works!!!) but this time, in 2 forms this doesn’t work… I don’t understand why!
Can you look:
in form 2 à Private Sub Fram_AfterUpdate()
Here has to be for each alphabet letter a sql filter and refresh at the end the form with only the people whith a name beginning with the selected letter.(people here is a sub form )
Select Case Fram
Case 1
stLinkCriteria = "People.Name Like 'A*'"
Case 2
stLinkCriteria = "People.Name Like 'B*'"
Case 3
stLinkCriteria = "People.Name Like 'C*'"
Case 4
stLinkCriteria = "People.Name Like 'D*'"
Case 5
stLinkCriteria = "People.Name LIKE 'S*'"
End Select
Me.PEOPLE.Form.Filter = stLinkCriteria
' Me.PEOPLE.Form.FilterOn = True
Me.PEOPLE.Form.Refresh
In searchParams form à Private Sub enter_Click()
Here filter on the form according to the selected field ( different form)
Dim stDocName As String
Dim stLinkCriteria As String
Select Case m_stateFilter
Case 1
stLinkCriteria = "Contact.ContactType= '" & contactCB.Column(0) & "'"
Case 3
stLinkCriteria = "Contact.idPeople = '" & nameCB.Column(0) & "'"
Case 4
stLinkCriteria = "Contact.datee BETWEEN #" & date1 & "# AND #" & date2 & "#"
End Select
'open this form with the data from the framFilter
'''''''''''''''''''''''''''''''''''''''''''''''
stDocName = "Contact"
DoCmd.OpenForm stDocName
Forms(stDocName).Filter = stLinkCriteria
Forms(stDocName).Refresh
can someone look and try to help me plzzzzzzzzz????

Can you look:
in form 2 à Private Sub Fram_AfterUpdate()
Here has to be for each alphabet letter a sql filter and refresh at the end the form with only the people whith a name beginning with the selected letter.(people here is a sub form )
Select Case Fram
Case 1
stLinkCriteria = "People.Name Like 'A*'"
Case 2
stLinkCriteria = "People.Name Like 'B*'"
Case 3
stLinkCriteria = "People.Name Like 'C*'"
Case 4
stLinkCriteria = "People.Name Like 'D*'"
Case 5
stLinkCriteria = "People.Name LIKE 'S*'"
End Select
Me.PEOPLE.Form.Filter = stLinkCriteria
' Me.PEOPLE.Form.FilterOn = True
Me.PEOPLE.Form.Refresh
In searchParams form à Private Sub enter_Click()
Here filter on the form according to the selected field ( different form)
Dim stDocName As String
Dim stLinkCriteria As String
Select Case m_stateFilter
Case 1
stLinkCriteria = "Contact.ContactType= '" & contactCB.Column(0) & "'"
Case 3
stLinkCriteria = "Contact.idPeople = '" & nameCB.Column(0) & "'"
Case 4
stLinkCriteria = "Contact.datee BETWEEN #" & date1 & "# AND #" & date2 & "#"
End Select
'open this form with the data from the framFilter
'''''''''''''''''''''''''''''''''''''''''''''''
stDocName = "Contact"
DoCmd.OpenForm stDocName
Forms(stDocName).Filter = stLinkCriteria
Forms(stDocName).Refresh
can someone look and try to help me plzzzzzzzzz????

