D
Diogo
Public Function Comando001_Click()
Dim mySQL As String
mySQL = "SELECT Numerario.Numerario FROM Numerario WHERE
(((Numerario.Data)=Date()))"
DoCmd.RunSQL mySQL
If mySQL = Null Then
DoCmd.SetWarnings WarningsOff
DoCmd.OpenQuery "append_numerario"
End If
End Function
Ok I was trying to use this code to run a query based on another query, but
it stops and says: "run-time error '2342'
A RunSQL action requires an argument consisting of an SQL statement"
Could someone help please?
Dim mySQL As String
mySQL = "SELECT Numerario.Numerario FROM Numerario WHERE
(((Numerario.Data)=Date()))"
DoCmd.RunSQL mySQL
If mySQL = Null Then
DoCmd.SetWarnings WarningsOff
DoCmd.OpenQuery "append_numerario"
End If
End Function
Ok I was trying to use this code to run a query based on another query, but
it stops and says: "run-time error '2342'
A RunSQL action requires an argument consisting of an SQL statement"
Could someone help please?