Hey folks. Just posted an introduction thread in that forum if anyone is interested.
I have a form/subform - frmCreditNewProgram and sfrmTeacherAttendance. These forms are built from a query that includes most of the fields from all of my tables. On the subform, users enter the name of schools and the names of teachers who attended the program.
I want to make sure that when a user enters this data, they enter a school and teacher as they exist in the database (there are separate forms for adding new schools and teachers). This will also prevent duplication from someone entering "XXX Elementary School" when it's really just "XXX Elementary" or "Pam" when the teacher exists as "Pamela." I even put unbound comboboxes in the header a person can use as a reference for spelling and format.
For the bound textbox where people enter the school name, I thought the simple validation rule "IN (tblSchools.SchoolName)" would work just fine, entered in the property sheet for this textbox, but it returns this error:
I have tried it using the query the forms are built off of, and a separate query that is just "tblSchools" but I get the same result (insert relevant query/table in to the error message). Any thoughts?
If possible, please give me a solution that does not involve VBA.
I have a form/subform - frmCreditNewProgram and sfrmTeacherAttendance. These forms are built from a query that includes most of the fields from all of my tables. On the subform, users enter the name of schools and the names of teachers who attended the program.
I want to make sure that when a user enters this data, they enter a school and teacher as they exist in the database (there are separate forms for adding new schools and teachers). This will also prevent duplication from someone entering "XXX Elementary School" when it's really just "XXX Elementary" or "Pam" when the teacher exists as "Pamela." I even put unbound comboboxes in the header a person can use as a reference for spelling and format.
For the bound textbox where people enter the school name, I thought the simple validation rule "IN (tblSchools.SchoolName)" would work just fine, entered in the property sheet for this textbox, but it returns this error:
Code:
The expression [tblSchools] you entered in the form control’s ValidationRule property contains the error The object doesn’t contain the Automation object ‘tblSchools.’.
Microsoft Access can’t parse the ValidationRule expression you entered. For example…
I have tried it using the query the forms are built off of, and a separate query that is just "tblSchools" but I get the same result (insert relevant query/table in to the error message). Any thoughts?
If possible, please give me a solution that does not involve VBA.