I have a text box on a form which contains a query that uses variables entered on the form.
It is basically a way of filtering the list. You type in a keyword or value for any of three fields and it requeries the list with the new criteria.
I need a way of counting the records in the list, as the query is pretty complicated and involves ()'s, using DCount("[field]","[data]","Big Long Query"
isn't working. Is there a way of getting Dcount to count the records in a query on a form?
form = [search]
textbox containing the query = [search_results]
so why can't I use DCount("[search_results]","[search]"
to count them? Am I doing something wrong? Can this be acheived any other way?
Thanks for your time
Jordan
PS the query is...
SELECT DISTINCTROW [Query1].[System], [Query1].[Subsystem],[Query1].[Plant item], [Query1].[Passport ID], [Query1].[Room identifier] FROM [Query1] WHERE ([Query1].[System] Like "*" & keyword & "*" OR [Query1].[Plant item] Like "*" & keyword & "*" OR [Query1].[Subsystem] Like "*" & keyword & "*"
AND [Query1].[System] Like "*" & ssystem & "*" AND [Query1].[Subsystem] Like "*" & ssub & "*" AND [Query1].[Plant item] Like "*" & sitem & "*";
It is basically a way of filtering the list. You type in a keyword or value for any of three fields and it requeries the list with the new criteria.
I need a way of counting the records in the list, as the query is pretty complicated and involves ()'s, using DCount("[field]","[data]","Big Long Query"
form = [search]
textbox containing the query = [search_results]
so why can't I use DCount("[search_results]","[search]"
Thanks for your time
Jordan
PS the query is...
SELECT DISTINCTROW [Query1].[System], [Query1].[Subsystem],[Query1].[Plant item], [Query1].[Passport ID], [Query1].[Room identifier] FROM [Query1] WHERE ([Query1].[System] Like "*" & keyword & "*" OR [Query1].[Plant item] Like "*" & keyword & "*" OR [Query1].[Subsystem] Like "*" & keyword & "*"