473,513 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Here's one for ya.

I have a history table with a bunch of IDs. What I need is to collect a
company/project id on the history table that has a particular yes/no
field flagged, then EXCLUDE that ID from a query. I've tried using a
query that lists the flagged dates along with the ID tags associated,
and tying that back to either the company info table or history, with
the criteria

<>[DecDate]![CyID]

Where DecDate is the query that lists the dates and IDs of the flag.
But I can't get this to work.

May 8 '06 #1
2 1173
Jaaz wrote:
I have a history table with a bunch of IDs. What I need is to collect a
company/project id on the history table that has a particular yes/no
field flagged, then EXCLUDE that ID from a query. I've tried using a
query that lists the flagged dates along with the ID tags associated,
and tying that back to either the company info table or history, with
the criteria

<>[DecDate]![CyID]

Where DecDate is the query that lists the dates and IDs of the flag.
But I can't get this to work.

I don't know about DecDate or CyID, but if I understand the problem,
here's what I might do. T1, History are the table names I'll use in the
example.

Query/New and add tables T1 and History. Drag relationship line between
T1 and History on the field ID. Now dbl-click the join line and set it
to All records in T1 and those that match in History. Now drag the
fields to display from T1. Now drag the ID field and YesNo field from
History. In the criteria row for ID, enter
Is Null
Right underneath enter
it Is Not Null
On the Is Not Null criteria line, under YesNo enter False or True
depending on whether or not you want toe data for Yes or No values

This is basically saying show all records from T1 that has no history
record or if it does, the YesNo must be Yes or No...your choice.


May 8 '06 #2
You could also try nesting a select statement in the criteria like this;

"SELECT * FROM T1 WHERE T1.ID NOT IN(SELECT T1ID FROM History WHERE
MyYesNoField=True;);"

That will filter out IDs from the Main table that have associated records in
History that have your YesNo field set to true in this case. This also
occurs without having to do any grouping. If you want to filter out IDs
that have the YesNo field set to false, just replace the True in the
preceding statement to False.

"Jaaz" <Ja****@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
I have a history table with a bunch of IDs. What I need is to collect a
company/project id on the history table that has a particular yes/no
field flagged, then EXCLUDE that ID from a query. I've tried using a
query that lists the flagged dates along with the ID tags associated,
and tying that back to either the company info table or history, with
the criteria

<>[DecDate]![CyID]

Where DecDate is the query that lists the dates and IDs of the flag.
But I can't get this to work.

May 9 '06 #3

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

Similar topics

15
2065
by: DavidS | last post by:
Have Visual Studio.NET installed on MS 2000 Professional OS laptop. No issue ever with web development and SQL connections. Purchased new laptop with XP Professional SP2!!!!!!!! & Visual...
22
2169
by: Rob R. Ainscough | last post by:
Sorry to hear about the job cuts and Oracle now out sourcing to India. Rob.
0
1313
by: Ramprasad | last post by:
Life is Different here, sky has no limit but you must grip it with this website, your Mirror of mind are present there. Whatever you want related to your everyday life, it can present or give...
1
1592
by: leighahh | last post by:
Hi everyone i was wondering if there was a way to turn this code that is css into HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
2
3363
by: dibblm | last post by:
I'll start this hopefully simple and add code where needed or requested. Im using a combobox that bound to a DataSet. The Dataset retreives it's values from SQL. I can retreive the values...
0
7267
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
7175
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
7542
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...
1
5100
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...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.