spaced45
asked on
Limit Drop Down Values Based on Field Values in Access 2007
I have a form that I would like to include a drop down control but I want to limit the values it displays based on the current record displayed. Each of the records that can be displayed contains a field I have called "DropDownItemMask". The field values all start with the letter "a" and then followed by a bunch of 1's and 0's. I was thinking that I could tie the position of the digit to the drop down values.
For example for the first drop down value if the mask for the current record contains a "1" in the second digit from the left from the "mask" then it would display, if it a "0" then it would not show and so forth.
I apoligize if I am not explaining this very well so to help I have attached and excel sheet showing the concept. DropDownItemMask.xlsx
Thank you
For example for the first drop down value if the mask for the current record contains a "1" in the second digit from the left from the "mask" then it would display, if it a "0" then it would not show and so forth.
I apoligize if I am not explaining this very well so to help I have attached and excel sheet showing the concept. DropDownItemMask.xlsx
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Capricorn1,
thank you for all the assistance. I do have one question. On what event should I place the vb code? Should it be on the OnCurrent event?
thank you for all the assistance. I do have one question. On what event should I place the vb code? Should it be on the OnCurrent event?
ASKER
Nevermind, I added it to the On Current Event and worked like a charm. Thank you
the rowsource for the drop down will be
select [item] from tblItems where selected=true