I have the following piece of code which runs when a user exits a particular record.
On checking the Database i find that this hasnt occurred on some occasions and my data therefore is incorrect, can someone tell me how I would run this code against ALL records in my database, as a macro perhaps ??
Private Sub cmdClose_Exit(Cancel As Integer)
TotalLabour = DLookup("[Total Billables]", "Projects Extended", "[ProjectID]=" & Nz([ID], 0))
TotalMaterials = DLookup("[Total Expenses]", "Projects Extended", "[ProjectID]=" & Nz([ID], 0))
End Sub
TotalLabour and TotalMaterials are in a table 'Projects'
Thanks
On checking the Database i find that this hasnt occurred on some occasions and my data therefore is incorrect, can someone tell me how I would run this code against ALL records in my database, as a macro perhaps ??
Private Sub cmdClose_Exit(Cancel As Integer)
TotalLabour = DLookup("[Total Billables]", "Projects Extended", "[ProjectID]=" & Nz([ID], 0))
TotalMaterials = DLookup("[Total Expenses]", "Projects Extended", "[ProjectID]=" & Nz([ID], 0))
End Sub
TotalLabour and TotalMaterials are in a table 'Projects'
Thanks