I'm making a database for my science lab. We're making proteins called antibodies. We're organizing the data to be entered based on who is doing the work and what "plate" their samples are from. In other words, many people are working with their own plates to make their own antibodies.
I made a form for entering new antibodies. On the form I have an unbound combo box that allows the person to select their name, the rowsource is a query that selects the PK from a user table. The combo box below is for selecting plates; the rowsource is a query that selects the PK from a plates table and only shows plates that have criteria for the userID selected in the first combo box on the form (userID is a FK on my plates table). This second combo box is also bound to a FK of plateID on my antibodies table. Then the user can enter a name for their antibody (in a text box that is bound to AntibodyName on the antibody table) and it will have a FK value associated for the plate it came from in the antibody table. I figured out how to do the requery code, and I believe my data is going into the tables how I expected.
The one minor cosmetic issue I'm having is that when I open the form and browse through old records, the two combo boxes are blank. My guess for this is that it is because the first user combo box is unbound and therefore contains a null value on loading, the second combo box that filters the plates based on the user is blank because the query for it relies on a value being in that first combo box (even though there is a value for this second bound box in the record source). I'm unfamiliar with vba syntax, but I've done some programming long ago and understand some principles. Is there a way to do a check on loading of the record, to see if my value for the combo box for plates (the second and bound in my cascade of two) isn't null, and if so it could display that value and then is there a way to reverse filter this to the associated user in the first combo box as well?
Or are my combo boxes not showing data for previously made records based on some other flaw?
Hopefully my problem makes sense. If not, let me know and I'll try and give more details on what I'm doing.