Roger's Access Library Homepage
Forum Home Forum Home > Other Download Libraries > MS Access MVP Libraries > Tejpal, A.D.
  New Posts New Posts RSS Feed - Form_ContWithCascadedCombo.mdb
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Please consider donating $1 per sample downloaded, (find out why here)

Form_ContWithCascadedCombo.mdb

 Post Reply Post Reply
Author
Message
A.D. Tejpal View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 30 Jun 2008
Status: Offline
Points: 192
Post Options Post Options   Thanks (0) Thanks(0)   Quote A.D. Tejpal Quote  Post ReplyReply Direct Link To This Post Topic: Form_ContWithCascadedCombo.mdb
    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: uploads/37/Form_ContWithCascadedCombo.zip

--

Email: adtejpal@gmail.com
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down