Kiwiman
Registered User
- Local time
- Today, 23:21
- Joined
- Apr 27, 2008
- Messages
- 799
Howzit
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:
My current vba method is
QTE is a Public Const """"
I have also tried the chr(34).
The error message I am getting is...
The fields and the tables are correct, but I can't seem to get the syntax corect.
Any help would be appreciated.
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:
Code:
UPDATE tblSOVStaging SET tblSOVStaging.SOVYear = DMin("[SOVYear]","tblSOV","[AuditNo]='" & tblSOVStaging!AuditNo & "'");
My current vba method is
Code:
strSQL = "UPDATE tblSOVStaging "
strSQL = strSQL & "SET tblSOVStaging.SOVYear = DMin(" & Qte & [SOVYear] & Qte & "," & Qte & tblSOV & Qte & "," & Qte & [AuditNo] & Qte & "= tblSOVStaging!AuditNo );"
CurrentDb.Execute strSQL
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.