Hi! Access question here.
I have three entry fields in a form. VBA mouse over I see the entries except on the last line of code below. I am not sure if my concatenate of these three values are formatted right. Form runs with full content because the values are not being recognized.
"'strrangecategory' & 'strFromDate' & 'strToDate'"
is the troubled string I think. Entry is From thru To date with a desired category (NULL for all). UG!
Here is the function below....can anybody help?
+++++++++++++++++++++++++++++
Private Sub Command99_Click()
Dim strFromDate As String
Dim strToDate As String
Dim strrangecategory As String
strFromDate = "adj_date_post >= '" & FromDate & " '"
strToDate = "adj_date_post <= '" & ToDate & "'"
strrangecategory = "category = '" & rangecategory & " '"
If IsNull(rangecategory) Then
DoCmd.Close
DoCmd.OpenForm "search_payee_budgetchk", acNormal, , "'strFromDate' & 'strToDate'"
Else
DoCmd.OpenForm "search_payee_budgetchk", acNormal, , "'strrangecategory' & 'strFromDate' & 'strToDate'"
End If
End Sub
Thanks!