The problem
I’ve currently been altering my MS Access database to be centred around Client ID rather than Client Name. However all my forms are still based on Client Name. I need to change this to be based on Client ID, but I want it to still appear as just Client Name to the users.
The structure
Before I go any further, I should explain the two relevant tables:
ClientTable:
– ClientID (PK)
– ClientName (indexed, no duplicates)
EntityTable:
– EntityName (CK, no duplicates)
– ClientID (CK, duplicates allowed)
– ClientName (a remnant of my past structure, I figure I won’t need this once I’ve sorted this issue out)
Key relationship: One Client has many Entities
There’s also good reason for my composite key (CK) but I won’t go into explaining that – my whole structure is far more complicated than shown above.
The form
So back to the form. Currently I have an ‘Entity’ form, which includes an EntityName text box and a ClientName dropdown box.
What I want to happen is that the Client Name dropdown box is visually and functionally the same for the user (i.e. when making a new entity, the user selects a client name), but what needs to happen is that it’s actually selecting the Client ID and associating it to that record.
I figure this is a fairly common problem but haven’t found an solution in my browsing. Any ideas?
This can simply be solved by changing the Row Source to:
Changing …
Where ClientID referes to the bound table for the form.