Print Page | Close Window

Form_ContWithCascadedCombo.mdb

Printed From: Roger's Access Library
Category: Other Download Libraries
Forum Name: Tejpal, A.D.
Forum Description: A.D. Tejpal's Library
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=108
Printed Date: 19 Oct 2017 at 5:05am


Topic: Form_ContWithCascadedCombo.mdb
Posted By: A.D. Tejpal
Subject: Form_ContWithCascadedCombo.mdb
Date Posted: 09 Jul 2008 at 10:30pm
This sample db demonstrates management of cascaded combo boxes on a 
continuous form, where first column (bound one) is hidden. 
 
Normally, use of filtered row source for a combo box on a continuous form suffers 
from the limitation that whenever the row source is altered for any fresh entry, the 
displayed values for this column in other records disappear - if the existing real 
values do not feature in the bound column of lookup list.
 
The above limitation is overcome by using a union query as the row source. 
Lookup list based upon this query has three parts:
    (a) All values relevant to filtered row source are displayed at top, showing "OK" 
         in the Validity column.
    (b) A separator row
    (c) Other values (not matching the filter criteria) are displayed at the bottom. 
         Validity column for such values displays "XX"
 
If the user attempts to select a row in lookup list, not having "OK" in the validity 
column, it is rejected with a suitable message asking for selection to be made only 
from OK items. Simultaneously, the combo box gets highlighted in color.
 
In order to prevent un-matched values, if the value in master combo (CboClient in 
this sample) is altered, existing value (if any) in the slave combo (CboContact in this 
sample) gets cleared (unless it happens to be valid in the updated row source as 
well).
 
If the user attempts to enter the slave combo while the master combo is blank, the 
slave gets locked and highlighted in color. A message box comes up, asking 
master value to be entered first and the focus gets sifted to master combo.
 
Note - Implementation of highlighting colors is found prompter and more effective in 
Access 2K3 as compared to Access 2K.

Download Access 2K/XP/2K3/2K7: http://www.rogersaccesslibrary.com/forum/uploads/37/Form_ContWithCascadedCombo.zip - uploads/37/Form_ContWithCascadedCombo.zip



-------------
--

Email: mailto:adtejpal@gmail.com - adtejpal@gmail.com



Print Page | Close Window