I am trying to convert an update query into vba. This update query includes the use of the DMIN function. The query works,
but I can't get the vba method to use.
The query is:
UPDATE tblSOVStaging SET tblSOVStaging.SOVYear = DMin("[SOVYear]","tblSOV","[AuditNo]='" & tblSOVStaging!AuditNo & "'");
My current vba method is
strSQL = "UPDATE tblSOVStaging "
strSQL = strSQL & "SET tblSOVStaging.SOVYear = DMin(" & Qte & [SOVYear] & Qte & "," & Qte & tblSOV & Qte & "," & Qte &
[AuditNo] & Qte & "= tblSOVStaging!AuditNo );"
QTE is a Public Const """"
I have also tried the chr(34).
The error message I am getting is...
Microsoft Access can not find the field 'l' referred to in your expression
The fields and the tables are correct, but I can't seem to get the syntax corect.
Any help would be appreciated.