i have constructed database to display specific records according to user choice from multiple comboboxes based on one taBLE but tried with many ways and give up
can any one help me to correct the following code:
i tried to filter the form too but it doesn't work
plz help
can any one help me to correct the following code:
Code:
Private Sub search_Click()
On Error GoTo Err_search_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim stLinkCriteria1 As String
Dim stLinkCriteria2 As String
Dim stLinkCriteria3 As String
stLinkCriteria1 = " central = " & Me.comcentral & ""
stLinkCriteria2 = " AND from = ' " & "'" & Me![comfrom] & "'"
stLinkCriteria3 = " AND cto = ' " & "'" & Me![comto] & "'"
stLinkCriteria = stLinkCriteria1 & stLinkCriteria2
stLinkCriteria = stLinkCriteria & stLinkCriteria3
MsgBox (stLinkCriteria)
stDocName = "kpi"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_search_Click:
Exit Sub
Err_search_Click:
MsgBox Err.Description
Resume Exit_search_Click
End Sub
plz help
Comment