473,401 Members | 2,139 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,401 software developers and data experts.

Add ALL to Combo - Unique Problem

Access 2000

I am trying to add "ALL" to a combobox that is filtered by DLookup in
a table of defaults. I need the 3rd field to have the same value as
the filter.

This is what I have so far.

I'm getting a "missing operator" error in UNION Select "*", "ALL"
,"DLookUp("CountyFil","tblDefaults")" FROM QVehicleNumber; in the
DLookup part of the statement.

SELECT QVehicleNumber.VehicleNumberID,
QVehicleNumber.VehicleNumberDesc, QVehicleNumber.CountyFilter
FROM QVehicleNumber
WHERE (((QVehicleNumber.CountyFilter)=DLookUp("CountyFil ","tblDefaults")))
ORDER BY QVehicleNumber.VehicleNumberDesc UNION Select "*", "ALL"
,"DLookUp("CountyFil","tblDefaults")" FROM QVehicleNumber;

TIA
Dale
Nov 12 '05 #1
3 1171
DFS
Dale,

The ORDER BY statement should be last.


"Dale Ring" <mt****@yadtel.net> wrote in message
news:d5**************************@posting.google.c om...
Access 2000

I am trying to add "ALL" to a combobox that is filtered by DLookup in
a table of defaults. I need the 3rd field to have the same value as
the filter.

This is what I have so far.

I'm getting a "missing operator" error in UNION Select "*", "ALL"
,"DLookUp("CountyFil","tblDefaults")" FROM QVehicleNumber; in the
DLookup part of the statement.

SELECT QVehicleNumber.VehicleNumberID,
QVehicleNumber.VehicleNumberDesc, QVehicleNumber.CountyFilter
FROM QVehicleNumber
WHERE (((QVehicleNumber.CountyFilter)=DLookUp("CountyFil ","tblDefaults")))
ORDER BY QVehicleNumber.VehicleNumberDesc UNION Select "*", "ALL"
,"DLookUp("CountyFil","tblDefaults")" FROM QVehicleNumber;

TIA
Dale

Nov 12 '05 #2
Ok, I moved the order clause to the end and I still get the same
problem.
In the statement below I put ???? at the start & end of the part the
gives the error "missing operator"
SELECT QVehicleNumber.VehicleNumberID, QVehicleNumber.VehicleNumberDesc,
QVehicleNumber.CountyFilter FROM QVehicleNumber WHERE
(((QVehicleNumber.CountyFilter)=DLookUp("CountyFil ","tblDefaults")))
UNION Select "*", "ALL" ,????"DLookUp("CountyFil","tblDefaults")"????
FROM QVehicleNumber ORDER BY QVehicleNumber.VehicleNumberDesc;

Thanks
Dale

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
DFS

"Dale Ring" <mt****@yadtel.net> wrote in message
news:3f*********************@news.frii.net...
Ok, I moved the order clause to the end and I still get the same
problem.
In the statement below I put ???? at the start & end of the part the
gives the error "missing operator"

Don't surround the Dlookup phrase in quotes or apostrophes.
SELECT QVehicleNumber.VehicleNumberID, QVehicleNumber.VehicleNumberDesc,
QVehicleNumber.CountyFilter FROM QVehicleNumber WHERE
(((QVehicleNumber.CountyFilter)=DLookUp("CountyFil ","tblDefaults")))
UNION Select "*", "ALL" ,????"DLookUp("CountyFil","tblDefaults")"????
FROM QVehicleNumber ORDER BY QVehicleNumber.VehicleNumberDesc;

Thanks
Dale

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would...
0
by: Andrew | last post by:
Hello, I am trying to create a chart whose underlying query is linked to 2 combo boxes on the same form. I want to pass the values from the combo boxes into the chart query to allow the chart...
6
by: jpr | last post by:
Hello, I have a table with the following fields: FATHERFIRSTNAME FATHERLASTNAME CHILDNAME1 CHILDNAME2 CHILDNAME3
5
by: jdwyer05 | last post by:
Hello, I am trying to populate a combo box with only unique values. Currently I am using an access database and VB6 Enterprise. The program populates the combo box fine however, there are several...
2
by: Dave | last post by:
>From a combo box the user can select a supplier. They then click the order button and are then taken to the orders page. From here comes the problem, I want the user to select a combo box unique...
7
by: raneking22 | last post by:
I have a form with 2 combo boxes in it. The first combo box is named combo0 and has as its row source: SELECT DISTINCT !field1 FROM ORDER BY ; The second combo box has as its row source: ...
5
by: a Wellner | last post by:
I am trying to create a from that the user can select a street from a combo box (named street), then pick a second street from another combo box, containing only valid cross streets(named Cross). ...
3
by: =?Utf-8?B?Y2RtdW5veg==?= | last post by:
I have created a sub routine to programmatically add an indefinite number of combo boxes to a form. The combo boxes are bound in code to a view for displaying the available options. This routine...
2
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.