Combo box editing problem, and information. (1 Viewer)

Larsporsenna

Registered User.
Local time
Yesterday, 21:01
Joined
Aug 20, 2013
Messages
17
I have a database and want to record the Maker, Product Type, and Model.
I have successfully used 3 combo boxes to ensure that the user can only Model within Product Type, within Maker. My problem is that when I go into the Maker and select an Maker from a list e.g Toshiba, I can then go back into the field on the form and edit it or delete it. I have tried to get it to use the list values only but this doesn't seem to work. Any help please.
Does anyone know where I might find useful information of the various actions that are available and how to use them. Some are relatively clear e.g. .Requery, others not so.
Thanks
 

jjturner

Registered User.
Local time
Today, 05:01
Joined
Sep 1, 2002
Messages
386
Hello,

This is where it becomes necessary to think through and consider a UI design strategy. What you've built with your dropdown controls are what they call "cascading comboboxes" or "cascading filters" - where a choice from the top level of the hierarchy dictates the choices available in the subsequent levels of the hierarchy. A quick Google or search of this site will quickly return a wealth of information on this subject.

Given your dilemma, one strategy I might suggest would be to query/warn the user with a message box (MsgBox - this would be in the BeforeUpdate event for the relevant control) if they attempt to change an already defined value in the higher levels of the hierarchy after the dependent level(s) has/have been selected, and then take the appropriate action based on their response from the message box (e.g., clear the dependent dropdown values, or return the changed control back to its original value via Cancel = True).

I'm not at a computer with Access at the moment, but hopefully that should give you some ideas to test out.

Cheers,
John
 

Larsporsenna

Registered User.
Local time
Yesterday, 21:01
Joined
Aug 20, 2013
Messages
17
Thanks,
I've found out what I was doing wrong. I had assumed that as it let me type in a value that the form would accept that value. I've set the limit to list value to Y and will let them get the error message.
 

jjturner

Registered User.
Local time
Today, 05:01
Joined
Sep 1, 2002
Messages
386
Sorry, I missed the part about limiting the value list - glad you got it sorted!
 

Users who are viewing this thread

Top Bottom