Paul-
Rather than set the Row Source in After Update of cboClass, set the Row Source
of cboSubClass to:
SELECT tblAll.txtSubClass FROM tblAll WHERE
(((tblAll.txtClass)=[Forms]![frmCaseAssignmentRegister]![cboClass]));
In the After Update event of cboClass AND the Current event of the Form, do:
Me.cboSubClass.Requery
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of paulc8481
Sent: Wednesday, July 25, 2012 2:04 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Problem with cascading combo boxes
I am creating a small database for the police at the facility which I work.
They wanted a cascading style using combo boxes that displays a
subclass(cboSubClass)of offences populated after selecting a value from the main
combo box called (cboClass). I have succeeded in this task by making multiple
tables populated with subclasses and writing a SELECT CASE structure in VBA to
populate the combo box(cboSubClass). NOW, There are so many Classes and
SubClasses that I think it would be much easier to create ONE table with Classes
and SubClasses and use an SQL statement to filter through the selections. My
problem is that I have tried to write the code for this but it is not working.
I will include the database in the files folder with what code I have in the
Record sourse section of the main combo box and the After update statements that
I have written. Any help to accomplish this task would be greatly appreciated.
The name of the file is: Case Assignment Register TEST
Thankyou
Paul
------------------------------------
Yahoo! Groups Links
Selasa, 24 Juli 2012
RE: [MS_AccessPros] Problem with cascading combo boxes
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar