Hi all Im new and am finally looking for some experienced help,
Ive been trying to fix this for a few days. My database has the typical structure Clients>Orders>OrderDetails>Products.....In tblOrders there is a DeliveryDate and TotalValue field. I want to create a DueAmount module that Sums all the [tblOrders]![TotalValues] for a particular client where the [tblOrders]!DeliveryDate is 3 months old (so [tblOrders]!DeliveryDate + 3months is >= Today)
Here is my DSum() code so far
Dim DueValue As Variant
DueValue = 0
DueValue = DSum("TotalValue", "tblOrders", "[ClientID] ='" & strClientID & "' AND DateAdd(m,3,#" & [tblOrders]!DeliveryDate & "#)>#" & Date & "#") <---What is wrong with this line. shows message box"Compiler Error: External name not defined"
Forms!Clients!DueAmount = DueValue
Forms!Clients!DueAmount.Requery
Thank you in advance...Help much appreciated
Oscar
Ive been trying to fix this for a few days. My database has the typical structure Clients>Orders>OrderDetails>Products.....In tblOrders there is a DeliveryDate and TotalValue field. I want to create a DueAmount module that Sums all the [tblOrders]![TotalValues] for a particular client where the [tblOrders]!DeliveryDate is 3 months old (so [tblOrders]!DeliveryDate + 3months is >= Today)
Here is my DSum() code so far
Dim DueValue As Variant
DueValue = 0
DueValue = DSum("TotalValue", "tblOrders", "[ClientID] ='" & strClientID & "' AND DateAdd(m,3,#" & [tblOrders]!DeliveryDate & "#)>#" & Date & "#") <---What is wrong with this line. shows message box"Compiler Error: External name not defined"
Forms!Clients!DueAmount = DueValue
Forms!Clients!DueAmount.Requery
Thank you in advance...Help much appreciated
Oscar