MISTAKE OF SYNTAX (Operator is Absent)

D

Douglas J. Steele

Don't know why it should be complaining about those specific values, but you
MUST use mm/dd/yyyy format for your date, regardless of what your regional
settings are. It will take 12/04/2004 as 4 Dec, 2004, not 12 Apr, 2004.

One thing to try, though, is change your declarations to

Dim rstDebito As DAO.Recordset
Dim rstVale As DAO.Recordset
 
F

Frank Dulk

as below and gives the following message MISTAKE OF SYNTAX (Operator is
Absent) in the expression of query" [CodCx] = ' 1 ' AND [DtJogo]=#04/04/2004
#'

Dim rstDebito As Recordset
Dim rstVale As Recordset
Dim strCodCx As Integer
Dim strDtJogo As Date
Dim strCriteria As String
Dim CurValeSoma As Double
Dim CurValeTb As Double

' Entrance of Parameters for I Calculate of you are Worth, based on the
field Debit of TbJogo'

Set rstDebito = CurrentDb.OpenRecordset("TbVales")
strCodCx = InputBox("Código do Caixa ?")
strDtJogo = InputBox("Dt do Jogo ?")

' I calculate of the Sum of all the Debits based on the parametros'

CurValeSoma = DSum("[Debito]", "TbVales", "'[CodCx] ='" & strCodCx & "' And
[DtJogo]=#" & Format(strDtJogo, "dd/mm/yyyy") & "#")

I don't know what to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top