dynamictiger
Technical User
I have the following SQL statement as a qdfTemp:
SQLOutput "SELECT AusPostCodes.ID, AusPostCodes.Pcode, AusPostCodes.Locality, " & _
"AusPostCodes.State, AusPostCodes.Comments, AusPostCodes.DeliveryOffice, " & _
"AusPostCodes.PresortIndicator, AusPostCodes.ParcelZone, AusPostCodes.BSPnumber, " & _
"AusPostCodes.BSPname, AusPostCodes.Category " & _
"FROM AusPostCodes "
"WHERE (((AusPostCodes.Locality) Like [Forms]![frmNewRecord]![txtsuburb] & ' * ') " & _
"AND ((AusPostCodes.State) Like [Forms]![frmNewRecord]![txtstate] & "*"
AND " & _
"((AusPostCodes.Comments) Like "PO" & "*"
);, _
qdfTemp
I haven't tried using wildcards before in this type of statemtn and the code won't compile. I am sure this is not correct, but MSDN keeps crashing on the most useful looking page. As you can see this is a copy of a query SQL and it works well in the query. I tried substituting strings for the like statement and didn't have much success with that idea either.
SQLOutput "SELECT AusPostCodes.ID, AusPostCodes.Pcode, AusPostCodes.Locality, " & _
"AusPostCodes.State, AusPostCodes.Comments, AusPostCodes.DeliveryOffice, " & _
"AusPostCodes.PresortIndicator, AusPostCodes.ParcelZone, AusPostCodes.BSPnumber, " & _
"AusPostCodes.BSPname, AusPostCodes.Category " & _
"FROM AusPostCodes "
"WHERE (((AusPostCodes.Locality) Like [Forms]![frmNewRecord]![txtsuburb] & ' * ') " & _
"AND ((AusPostCodes.State) Like [Forms]![frmNewRecord]![txtstate] & "*"

"((AusPostCodes.Comments) Like "PO" & "*"

qdfTemp
I haven't tried using wildcards before in this type of statemtn and the code won't compile. I am sure this is not correct, but MSDN keeps crashing on the most useful looking page. As you can see this is a copy of a query SQL and it works well in the query. I tried substituting strings for the like statement and didn't have much success with that idea either.