I am trying a simple update task to count the number of records in linked table that belong to one record in a master table. The master table is of Members, the linked table, GroupMembers, is a list of groups that each member belongs to. A simple one to many join.
I have tried the following code:
DoCmd.RunSQL "Update Members Set GroupCount = DCount("*", "GroupMembers", "GroupMembers.GMMember=Members.MemberNumber")"
The visual basic editor keeps wanting an end statement before the last conditional statement in the Dcount expression.
What am I doing wrong?
I have tried the following code:
DoCmd.RunSQL "Update Members Set GroupCount = DCount("*", "GroupMembers", "GroupMembers.GMMember=Members.MemberNumber")"
The visual basic editor keeps wanting an end statement before the last conditional statement in the Dcount expression.
What am I doing wrong?
Last edited: