Hi Im now recieving a different error
Too few parameters. Expected 1
Code:
Dim Db As DAO.Database
Set Db = CurrentDb()
Dim stDocName As String
Dim strSQL As String
Dim rs As DAO.Recordset
stDocName = "Count"
strSQL = "SELECT * FROM [" & stDocName & "] WHERE [Operation]=[" & Me.OPERATION & "] "
Set rs = CurrentDb.OpenRecordset(strSQL)
Counter = rs.RecordCount
If (Counter > 0) Then
MsgBox ("Success")
Else
MsgBox ("Fail")
End If
This is my query "Count"
Code:
SELECT User_Table.OPERATION
FROM User_Table;
Just to Explain stDocName is my query in access Operation is the field the query is pulling and also the name of the textbox.
Thanks