calculated field to VBA

SmallTime

Registered User.
Local time
Yesterday, 21:45
Joined
Mar 24, 2011
Messages
246
Hi All,

Anyone know how I could write the following in VBA, perhaps using something like DCount. (can DCount have more then one veriable?)

=Sum(IIf([TDIsTarget]=True And IsNull([TDCompleted]),1,0))

The Table name I want to extarct the data from is tdAppointments and the date field names are as above [TDIsTarget] and [TDCompleted]

Many thanks
SamllTime :o
 
I'm guessing this:

Code:
dim count as integer

count = DCount("tdAppointmentID", "tdAppointments", "TDIsTarget = true AND TDCompleted IS NULL")
 
Many many thanks

I'll give it a go in a while
 

Users who are viewing this thread

Back
Top Bottom