expected: list separator or ) on subform

  • Thread starter lizo.consulting
  • Start date
L

lizo.consulting

I am working on a database to tracks students in a school. I've built
my table structure and set up my relationships, but am having trouble
with an error on a subform: expected: list separator or ). I am pretty
experienced with access and have never never encountered this problem
before.

The error is occuring on a subform to Track Parents (data source is
"Tbl Relationships") on the master "StudentForm" (data source is "tbl
Students"). Subform is linked to master via a shared field --
studentid.

The purpose of the subform is to allow grownups (e.g.
parents/guardieans, emergency contacts, etc) to be assigned to a child.
On the subform, the user picks a grownup from from a Combo Box (list
stored in the "tbl grownups") and then picks a "relationship" from a
Combo Box (relationship list is stored in the "lst Relationships"). The
studentid is automatically entered, as is the relationshipid autonumber
field.

When I try to create a new record either by picking from the parent or
relationship combo, database returns "expected: list separator or )".
The error occurs ONLY when I am adding a new record. Once the error
occurs, i am able to change the entries.

Also, the error does not occur when I work with the subform separate
from the parent form, only when it is displayed on the master form,
linked by student id.

Any hints for me what might be happening?

Liz O'Donoghue
(e-mail address removed)
 
K

Ken Snell \(MVP\)

Sounds like you're running some VBA code under the covers as part of the new
record's creation/saving. Tell us more about what that code is doing, and
post it for us to see. Just a guess, you're probably generating some type of
append query SQL statement, and your code assumes that both listboxes will
have values, but in some cases only one does, so the SQL statement is being
generated with incorrect syntax.
 
L

lizo.consulting

Thanks for the feedback.

The interesting thing is that I hadn't attached any code to the forms
yet. I ended up double checking the relationships, renaming a few
fields, and created the forms from scratch again. Remarkably now it all
works perfectly...

Liz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top