Solved Dcount on Query (1 Viewer)

Sarah.M

Member
Local time
Today, 21:02
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason (Cybersecurity).
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
------------------------------------------------
I have EmployeeT and PhoneT
I make Query to show me How many phones does the employee own? this query will be bound with EmployeeF
I got no result and I got this message error :confused::(:cautious:
plz help me 🙏
Sample Attached


1669388220326.png
1669388158007.png
 

Attachments

  • HowManyPhoneNumber.accdb
    1.1 MB · Views: 72

Sarah.M

Member
Local time
Today, 21:02
Joined
Oct 28, 2021
Messages
335
The good way if I make the Dcount from Query Filter will work always
1669389356668.png
 
Last edited:

bob fitz

AWF VIP
Local time
Today, 19:02
Joined
May 23, 2011
Messages
4,727
Try the attached db. Post back if you have questions.
 

Attachments

  • HowManyPhoneNumber Bob01.accdb
    1.1 MB · Views: 84

Sarah.M

Member
Local time
Today, 21:02
Joined
Oct 28, 2021
Messages
335
I did this way but still I got error
CountPhones: DCount("[PhoneT]![PhoneID]","[PhoneT]","=[EmployeeID]=" & [EmployeeIDFK])
CountPhones: DCount("[PhoneT]![PhoneID]","[PhoneT]","[EmployeeID]=" & [EmployeeIDFK])



1669391130550.png

1669391426375.png

1669391470748.png
 

Users who are viewing this thread

Top Bottom