Combo Box Criteria on a form

  • Thread starter Thread starter Lee-Anne Waters via AccessMonster.com
  • Start date Start date
L

Lee-Anne Waters via AccessMonster.com

Hello All,

i have a form set up that amoung other contorls contains two combo boxes. the combo boxes query a set list of codes, some are 4 characters in length the others are 5 characters in length.

if a code is 4 characters in length then the user must select the 5th character from the drop down list on the other combo box.

the problem that i am having is that not all users select the 5th character if the first combo box has 4.

there is also no need to select a 5th character if the they have selected a 5 character code from the first combo box.
any ideas on how i can force them to have to select the fifth character if the first combo totals 4 characters.
confusing yes..... sorry

*****************************************
* This message was posted via http://www.accessmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.accessmonster.com/Uwe/Abuse.aspx?aid=b21da5b61d79471888480fffd432cceb
*****************************************
 
Hi,


In the after update event procedure of the first combo box:

Me.OtherComboBox.Enabled = CBool( 1 > DCount("*", "TableNameHere",
"FieldCode LIKE """ & me.ThisComboBox & "*""" ) )


So, if there is just 1 record with the actual characters in "ThisComboBox",
then the other combo box is disabled. Change the name OtherComboBox,
ThisComboBox, TableNameHere and FieldCode for the real names.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top