Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Cascading conditional drop-boxes?

$
0
0
Good afternoon all,

I'm a relative n00b, I can find my way around SQL Server, unfortunately, I'm fighting Access on this one. I have been trying to pillage this forum for great ideas architecting this database, but I don't think I'm good enough to figure some things out.

I have a table named tblCustomers, that contains ClientID (foreign key), CompanyName, then address, market segment, etc... Another table, tblCustContacts, has Client ID (not a constraint here), CompanyName, and then Contact, ContactPhone, etc...

I have a form that I would like to build that would have CompanyName drawn out of tblCustomers, ClientID out of tblCustomers, Contact out of tblCustContacts. I have that. So what's my problem, you ask?! I would like to restrict my drop-down list of Contacts to the ones attached to the CompanyName that the people have retrieved. And if there is no contact attached to that record, then I want them to be able to input one.

I can do one, or the other, but not both together. I tried to add a query to restrict my data, and then a (shamelessly pillaged off someone here) VBA code to do a "not in list" event procedure, but it won't work, and it's probably entirely my fault.

I don't know how to get this working. I attached a simpler, less proprietary DB as an example. Please let me know if you can help me! I've been trying everything I know, and a lot of what other people know, and I can't get this to make sense. I don't know how to code, VBA or anything else for that matter. Thank you!

Attached Files
File Type: zip DBForums Sandbox.zip (463.0 KB)

Viewing all articles
Browse latest Browse all 13329

Trending Articles