G
Guest
I have the following code:
Private Sub Form_Current()
If Not IsNull(Me.ID) Then
Me.Desks = DSum("Desks", "tblInstalationBuildings",
"[tblInstalationBuildings].[Compound] =" & Me.ID)
End If
End Sub
This sets all Desks fields in the continuous form to be the same value
including the default value for desks of a new record. The continuous form is
a continuous list of compounds. I am trying to display the sum of all desks
in that compound which is the sum of all desks in tblInstalationBuildings
with Compound equal to the ID of this record (compound). The continuous form
is a subform so i am limited in my options. Am I placing this code in the
wrong function? Thank You.
Private Sub Form_Current()
If Not IsNull(Me.ID) Then
Me.Desks = DSum("Desks", "tblInstalationBuildings",
"[tblInstalationBuildings].[Compound] =" & Me.ID)
End If
End Sub
This sets all Desks fields in the continuous form to be the same value
including the default value for desks of a new record. The continuous form is
a continuous list of compounds. I am trying to display the sum of all desks
in that compound which is the sum of all desks in tblInstalationBuildings
with Compound equal to the ID of this record (compound). The continuous form
is a subform so i am limited in my options. Am I placing this code in the
wrong function? Thank You.