473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How do I Use Cascaded Filters

dgaletar
72 64KB
{Moderator Edit}
I have moved this hijack post to a new thread. Please do not take over an existing thread with your own questions as this is a punishable offense.
The original thread, from where this was originally taken, can be found at how to filter list of items in a combo box by selecting items in another combo.
{/Moderator Edit}
Hey guys... it's me again! I'm stuck on this one also. I have read both of your articles, and must say that both are very detailed and well written... thank you.

I found, though, that the article written by Rabbit more closely reflects my situation. My problem is that I am trying to use the first combo box for them to select the Department, and the second for them to select the truck number from that Department (CUA#). Both details can be found in the same table - VEHICLE DETAILS : Table.

Here is the code I am using:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo14_Click()
  2.     With Me![CUA#]
  3.         If IsNull(Me!Department) Then
  4.             .RowSource = ""
  5.         Else
  6.             .RowSource = "SELECT [CUA#] " & _
  7.                          "FROM VEHICLE DETAILS : Table " & _
  8.                          "WHERE [CUA#]=" & Me!Department
  9.         End If
  10.         Call .Requery
  11.     End With
  12. End Sub
I'm getting "red flagged" on the "Else" statement (see attached Screenshot 1.

The form (named "Department List : Form") is visible in Screenshot 2, and the layout of the table is visible in Screenshot 3.

Thanks!



Attached Images
File Type: jpg ScreenShot1.jpg (30.6 KB, 216 views)
File Type: jpg ScreenShot2.jpg (25.4 KB, 211 views)
File Type: jpg ScreenShot3.jpg (46.5 KB, 190 views)
Jan 31 '13 #1

✓ answered by Seth Schrock

My guess is that the error is in your FROM clause. If the name of your table is "Vehicle Details : Table" then you need to put it inside brackets [] to be
Expand|Select|Wrap|Line Numbers
  1. FROM [Vehicle Details : Table]

2 1099
Seth Schrock
2,965 Expert 2GB
My guess is that the error is in your FROM clause. If the name of your table is "Vehicle Details : Table" then you need to put it inside brackets [] to be
Expand|Select|Wrap|Line Numbers
  1. FROM [Vehicle Details : Table]
Jan 31 '13 #2
NeoPa
32,556 Expert Mod 16PB
Dgaletar,

This question has been answered fully. If you have further problems then please post a new question properly with the relevant details included. You also have the option to link to an existing thread if you believe that will help. Please make sure the question posted makes sense on its own though, without the need to visit the linked thread to make sense of the question (EG. Don't post a question simply asking for help with code found in another thread). You may find the following links helpful on that score :
Before Posting (VBA or SQL) Code.
How to ask "good" questions -- READ BEFORE SUBMITTING A QUESTION!.
POSTING_GUIDELINES: Please Read Carefully Before Posting to a Forum.

Dgaletar:
I have read both of your articles, and must say that both are very detailed and well written... thank you.
Thank you. You go on to say you found Rabbit's article more related to your question. That is fine, but leads me to assume you perhaps didn't understand the Cascaded Form Filtering very well though. I believe it covers your scenario fully, but then it's always easier to see things from a position of experience.

To make it very clear - any further question or answer posts related to any further questions (other than the original one of the thread) that are posted in here are very likely to be deleted.
Jan 31 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Jan Wieck | last post by:
Dear community, for some reason the post I sent yesterday night still did not show up on the mailing lists. I have set up some links on the developers side under...
1
by: Michael Blackney | last post by:
I've been looking into cascaded macros and I can't seem to find if what I'm doing is portable. I want to do something like: #define THREE_ONES 1,1,1 #define ONE_TWO_THREE 1,2,3 #define...
6
by: TJO | last post by:
Below is some sample code that fades div tags that is not working in IE 6.0.29 on xp sp2. Can anyone help see why the if(ie5) document.getElementById(divID).filters.alpha.opacity lines are not...
1
by: Dieter Vanderelst | last post by:
Hello, I'm trying to access the Filters-Dll provided by the filters-project (http://filters.sourceforge.net/index.htm). Following the advice I got from the Python list -thank you for that-, I...
0
by: kucol | last post by:
Hi guys, I wanted to ask you for help as I am struggling with it second evening already... I have got tables DEVICES and PARTS. One device can consist of multiple parts. But... I have...
4
by: ApexData | last post by:
I have a 15 LookUp Tables tied to 15 ComboBoxes. Some of the Tables contain 3 to 10 Recs, and a couple contain up to 50 Recs. 1- Is it a CommonPractice to link the field that gets the ComboBox...
11
by: seangibson | last post by:
Sorry, I've been posting alot of questions regarding cascaded combo boxes here but each time I solve one problem I seem to be faced with a new. This time here's the problem: I've got the combo...
6
by: dbuchanan | last post by:
There are three parts to this 1.) How do I cascade menus? 2.) And, how do I cascade menus with a multi-select CheckBoxList?
3
NeoPa
by: NeoPa | last post by:
Cascaded Form Filtering CHAPTER 1 - TABLE OF CONTENTS (Including attached database) CHAPTER 2 - INTRODUCTION CHAPTER 3 - TABLE LAYOUT CHAPTER 4 - FORM LAYOUT CHAPTER 5 - FORM MODULE CHAPTER 6...
3
by: MOCaseA | last post by:
I have a record lookup form that has several combo box filters set up. However I noticed a slight problem. The filters are working correctly, but there are now over 2000 entries and when filtering...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.