T
Tony Williams
I know there is a facility in Access 2000 to convert macros to VBA but is
there a facility to convert queries to VBA? I have an update query that is
run from a command button on a form but I want the procedure that the query
runs to run as the AfterUpdate property of another form. Is that possible?
Here is my SQL.
UPDATE tblmaintabs SET tblmaintabs.txtDomfacsole =
IIf([txtMonthLabel]=[Forms]![frmdate4]![txtqtr2],[txtDomfacsoleqtr],0)-DLook
Up("[txtDomfacsoleqtr]","[tblmaintabs]","[txtMonthLabel]=[Forms]![frmdate4]!
[txtqtr3]and txtCompany='" & [txtCompany] & "'"), tblmaintabs.txtDomfacpart
=
IIf([txtMonthLabel]=[Forms]![frmdate4]![txtqtr2],[txtDomfacpartqtr],0)-DLook
Up("[txtDomfacpartqtr]","[tblmaintabs]","[txtMonthLabel]=[Forms]![frmdate4]!
[txtqtr3]and txtCompany='" & [txtCompany] & "'")
WHERE (((tblmaintabs.txtMonthlabel)=[Forms]![frmdate4]![txtqtr2]));
I'm a newbie at VBA so please handle me with care!
Thanks
Tony
there a facility to convert queries to VBA? I have an update query that is
run from a command button on a form but I want the procedure that the query
runs to run as the AfterUpdate property of another form. Is that possible?
Here is my SQL.
UPDATE tblmaintabs SET tblmaintabs.txtDomfacsole =
IIf([txtMonthLabel]=[Forms]![frmdate4]![txtqtr2],[txtDomfacsoleqtr],0)-DLook
Up("[txtDomfacsoleqtr]","[tblmaintabs]","[txtMonthLabel]=[Forms]![frmdate4]!
[txtqtr3]and txtCompany='" & [txtCompany] & "'"), tblmaintabs.txtDomfacpart
=
IIf([txtMonthLabel]=[Forms]![frmdate4]![txtqtr2],[txtDomfacpartqtr],0)-DLook
Up("[txtDomfacpartqtr]","[tblmaintabs]","[txtMonthLabel]=[Forms]![frmdate4]!
[txtqtr3]and txtCompany='" & [txtCompany] & "'")
WHERE (((tblmaintabs.txtMonthlabel)=[Forms]![frmdate4]![txtqtr2]));
I'm a newbie at VBA so please handle me with care!
Thanks
Tony