Effing Access combo boxes, how do they work?
July 8, 2010 7:39 AM Subscribe
I'm trying to make a combo box populate properly in an MS Access form (oh, the pain), and I need some help.
posted by middleclasstool to computers & internet (2 answers total) 2 users marked this as a favorite
New job has asked me to whup up a quick Access database to help them track some data for medical practices we visit. I am very unfamiliar with Access, and I'm having the following problem:
I have a table full of practice data. One of the fields is a numeric field that holds a unique ID for that practice's primary contact. That ID and relevant information are stored in a staff table. Each staff record also stores the ID number for that practice.
I've got the tables done, and a form for adding/editing data for each practice mostly done, but that primary contact field is screwing me up. I'm trying to make it be a combo box that drops down to reveal only those records from the staff table that have the current record's practice ID, but it's giving me all of them. I'd like it to show the staff member's last name and first name, and then feed that person's staff ID to the table.
I tried setting Row Source to be an SQL statement that joins the staff table to the practice table, but I can't figure out how to feed it the current record's practice ID automatically.
If coding is needed here, I'm a programmer with no VB knowledge, but so far I've had no trouble banging out code by googling syntax.