Hi all,
I use an unbound textbox in my application menu to search the content of some forms on the “click event” of a dedicated button. I use the below code, the continuous form opens but displays no results....also..how do i centre the text in the textbox? I do not use this code in the forms on load event since this form is globally used in the application.
Values. Alphanumeric
“AllAB” = query
[AB] = Combined .. [A] & "/" & in the “AllAB” query
Private Sub Button1_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "All"
If DCount("*", "AllAB", "[AB] like '*" & Me.Search & "*'") > 0 Then
DoCmd.OpenForm stDocName
Forms![All].Filter = "[AllAB]like '*" & Me.Search & "*'"
Forms![All].FilterOn = True
Else
MsgBox "No fruits found"
End If
End Sub
Any ideas why this code does not return any value in the continuous form “All”?
Thanks!
I use an unbound textbox in my application menu to search the content of some forms on the “click event” of a dedicated button. I use the below code, the continuous form opens but displays no results....also..how do i centre the text in the textbox? I do not use this code in the forms on load event since this form is globally used in the application.
Values. Alphanumeric
“AllAB” = query
[AB] = Combined .. [A] & "/" & in the “AllAB” query
Private Sub Button1_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "All"
If DCount("*", "AllAB", "[AB] like '*" & Me.Search & "*'") > 0 Then
DoCmd.OpenForm stDocName
Forms![All].Filter = "[AllAB]like '*" & Me.Search & "*'"
Forms![All].FilterOn = True
Else
MsgBox "No fruits found"
End If
End Sub
Any ideas why this code does not return any value in the continuous form “All”?
Thanks!