bill201
asked on
problem by using runsql in access 2010
i have a code that have to run a query and check if in the qury value is higher then 1 one and if is truh that i have to get an message and there is my code:
<Dim b
b = DoCmd.RunSQL("SELECT Count(InvoiceT.Price) AS CountOfPrice " & _
"FROM InvoiceT " & _
"GROUP BY InvoiceT.Product " & _
"HAVING Product =" & Me.ListProducts.Column(1))
If b > 1 Then MsgBox "There is not matching pricse">
but i get an error message that point on the "runsql" :Compile error:
Expected Function or variable
<Dim b
b = DoCmd.RunSQL("SELECT Count(InvoiceT.Price) AS CountOfPrice " & _
"FROM InvoiceT " & _
"GROUP BY InvoiceT.Product " & _
"HAVING Product =" & Me.ListProducts.Column(1))
If b > 1 Then MsgBox "There is not matching pricse">
but i get an error message that point on the "runsql" :Compile error:
Expected Function or variable
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.