i´m sending the code for with the problem
when i put the value in the value control in a form the i execute this code.
if works for every fields in exception for the currency field (VValor).
i used CSTR but it didn´t work too, i put in the form control de value 500 and it works but if i put the value 500,22 an error happens
Dim MyDatabase As DATABASE
Dim MyQueryDef As QueryDef
Dim where As Variant
Set MyDatabase = CurrentDb()
If ObjectExists("Queries", "Q-Listagens Banco" = True Then
MyDatabase.QueryDefs.Delete "qryDynamic_QBF"
MyDatabase.QueryDefs.Refresh
End If
where = Null
where = where & " AND [Banco]= '" + Me![Banco] + "'"
where = where & " AND [Movimento]= '" + Me![Movimento] + "'"
where = where & " AND [MES]= '" + Me![PMês].Column(1) + "'"
where = where & " AND [ANO]= '" + Me![Ano].Column(0) + "'"
THIS IS MY PROBLEM
where = where & " AND [VValor]= " + CStr(Me![VValor])
Set MyQueryDef = MyDatabase.CreateQueryDef("qryDynamic_QBF", _
"Select * from [Q-Listagens Banco] " & (" where " + Mid(where, 6) & ";")
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.