
Originally Posted by
andy49
Create a textbox and type in it
= dcount("activecontacts","tblcontacts", "where activecontacts =" & me.trackingcode
Sent from my iPhone using Tapatalk
I think I have something out of order or named wrong.
Here is field table one with the contacts ( tblContacts):
Campaign_ID
Here is the actual campaign table. (tblCampaigns ):
ID - Which is the related field to the contact.
Here is the Textbox on the form. ( txtActiveContacts )
Is this how I should put this on the form?
Private Sub Form_OnLoad()
Code:
'## Check the Campaign Code and show how many contacts have resulted.
' If this is not a new record then
If not New.Record then
'Check the contact's Campaign ID, add the total records and post the result to txtActiveContacts
txtActiveContacts.Value = dcount ( "Campaign_ID","tblContacts", where "Campaign_ID" = Me!ID)
End If