I'm an absolute beginner (a few weeks with Google and these forums) with Access, SQL, and VBA, so my apologies if this has been answered a thousand times. (And if this question would fit better in a different section, please let me know!)
I've got a subform dealing with bibliographical information. I've just normalized the tables so publications are in their own table (tblPublication), and page number references, etc. are in another (tblPublicationEntry). There is a one to many relationship between tblPublication and tblPublicationEntry using PublicationID as the primary/foreign key.
tblPublication includes the fields Corpus, CorpusVolume, AuthorLast, AuthorFirst, and PubYear. Depending on the publication, the value for some of these fields may be null.
I want to be able to get to a single pre-existing record in tblPublication by entering data in one of three combinations of comboboxes: 1) cmbCorpus and cmbPubYear, 2) cmbCorpus and cmbCorpusVolume, or 3) cmbAuthorLast, cmbAuthorFirst, and cmbPubYear.
The first selection for each combobox tree should filter all of the others. Preferably, the comboboxes further down the tree should display the first non-null entry after selections are made in the first comboboxes, rather than displaying a blank field. (Though I still want to be able to select a blank field in order to create new records as needed.)
I tried just doing AuthorLast and AuthorFirst to start out with, following some of the tutorials I found for filtering the results of one combobox based on another, and have been running into some issues:
When I change the AfterUpdate event on cmbAuthorLast to say "Me.AuthorFirst.Requery", it seems to work when I open the subform by itself. But the second I try to do the same thing from my main form, it tells me "Field cannot be updated". I've checked the properties of the subform half a dozen times, and nothing is locked.
Similarly, I've got the Record Source for cmbAuthorFirst set to filter results based on forms!fsubPublication.cmbAuthorLast. Again, that works fine when I open the subform by itself, but when I try it from the main form it pops up the Enter Parameter Value dialog box.
Clearly I'm missing something in the syntax of my combobox references or the structure of my subform - but everything else in the subform still works when it's embedded in the main form. Any suggestions?