View Full Version : Access Tables from a Form for calculations


JimMiller
01-16-2002, 11:09 AM
I am trying to access fields in a table from a Form's VBA code. I am having trouble with the syntax for accessing tables. Here is what I have coded so far:

If IsNull([Table]![Issues]![RevisedEstHours]) = False Then
[Table]![Issues]![RemainingHours] = [Table]![Issues]![RevisedEstHours] - (DSum("[NumberHours]", "[IssueAllocation]", "NASIssueNumber = " & [Forms]![ProjectTrack]![NASIssueNumber]))
Else
[Table]![Issues]![RemainingHours] = [Table]![Issues]![EstimatedHours] - (DSum("[NumberHours]", "[IssueAllocation]", "NASIssueNumber = " & [Forms]![ProjectTrack]![NASIssueNumber]))
End If

Anyone have any ideas why it is not working?