473,387 Members | 1,904 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,387 software developers and data experts.

Report capturing data from 'red flagged' field

I am trying to capture data in a date parameter query that spans from
1 to 3 months. I have a field that is a checkbox that notes whether or
not this data is 'red flagged' (so you know, the red flagged data is
end of the month production that is reported in the following months
report)
I need to capture the red flagged production from the previous month
and the production from the entered month(s) not including the red
flagged production for the last month that was entered in the
parameter. Does anyone have any ideas on how to capture this?

Any help would be greatly appreciated

Thanks in advance,
Norma
nj**********@suscom.net
Nov 12 '05 #1
3 1976
Norma wrote:
I am trying to capture data in a date parameter query that spans from
1 to 3 months. I have a field that is a checkbox that notes whether or
not this data is 'red flagged' (so you know, the red flagged data is
end of the month production that is reported in the following months
report)
I need to capture the red flagged production from the previous month
and the production from the entered month(s) not including the red
flagged production for the last month that was entered in the
parameter. Does anyone have any ideas on how to capture this?

Any help would be greatly appreciated

Thanks in advance,
Norma
nj**********@suscom.net

Let's say the table is called Table1 and the field to compare is called
DateField. The primary key is ID, and you have a field called RedFlagged.

Create 2 queries. Select Table1. Drag the ID and RedFlagged fields to
the first 2 columns. In the criteria row for RedFlagged, enter True.
Move to the blank 3rd column and in the Field rowenter the following
Expr1:Month(DateField)
and in the criteria row enter
Month(DateAdd("m",-1,Date())

This will select all redflagged records from the prior month. Since
this will pull up red flagged records from prior years, you might want
to simply exclude this third field and in the criteria row under
DateField enter
Between
DateSerial(Year(dateadd("m",-1,DateField)),Month(dateadd("m",-1,DateField)),1)
And DateField - Day(DateField)

This will select all records from the first to last day of the prior month.

Save this query as Q1.

Now click on Query tab, select New/FindUnmatched wizard

Select Table1 and Q1, set the link between ID field and follow the
wizard steps. You will need to set a criteria to filter within a date
range. You enter enter under date field
Between [ENter From Date] And [Enter To Date]


Nov 12 '05 #2
I am getting an error message. It says that I have too many
Parenthesis. It does not like the ending of the statement:
Between
DateSerial(Year(dateadd("m",-1,DateField)),Month(dateadd("m",-1,DateField)),1)
And DateField - Day(DateField)
It highlights the next to the last parenthesis. Any ideas??
And thanks so much for your help so far..
Norma

Salad <oi*@vinegar.com> wrote in message news:<hL*****************@newsread1.news.pas.earth link.net>...
Norma wrote:
I am trying to capture data in a date parameter query that spans from
1 to 3 months. I have a field that is a checkbox that notes whether or
not this data is 'red flagged' (so you know, the red flagged data is
end of the month production that is reported in the following months
report)
I need to capture the red flagged production from the previous month
and the production from the entered month(s) not including the red
flagged production for the last month that was entered in the
parameter. Does anyone have any ideas on how to capture this?

Any help would be greatly appreciated

Thanks in advance,
Norma
nj**********@suscom.net

Let's say the table is called Table1 and the field to compare is called
DateField. The primary key is ID, and you have a field called RedFlagged.

Create 2 queries. Select Table1. Drag the ID and RedFlagged fields to
the first 2 columns. In the criteria row for RedFlagged, enter True.
Move to the blank 3rd column and in the Field rowenter the following
Expr1:Month(DateField)
and in the criteria row enter
Month(DateAdd("m",-1,Date())

This will select all redflagged records from the prior month. Since
this will pull up red flagged records from prior years, you might want
to simply exclude this third field and in the criteria row under
DateField enter
Between
DateSerial(Year(dateadd("m",-1,DateField)),Month(dateadd("m",-1,DateField)),1)
And DateField - Day(DateField)

This will select all records from the first to last day of the prior month.

Save this query as Q1.

Now click on Query tab, select New/FindUnmatched wizard

Select Table1 and Q1, set the link between ID field and follow the
wizard steps. You will need to set a criteria to filter within a date
range. You enter enter under date field
Between [ENter From Date] And [Enter To Date]

Nov 12 '05 #3
Norma wrote:
I am getting an error message. It says that I have too many
Parenthesis. It does not like the ending of the statement:
Between
DateSerial(Year(dateadd("m",-1,DateField)),Month(dateadd("m",-1,DateField)),1)
And DateField - Day(DateField)
It highlights the next to the last parenthesis. Any ideas??
And thanks so much for your help so far..
Norma


Brain Freeze.

Please change
DateField
to
Date()
with the parenthesis.

Here is my SQL Statement where I want to select all records from the
prior month that have been redflagged. The table/query field names are
ID, DateField, and RedFlagged.

SELECT ID
FROM Table1
WHERE DateField Between
DateSerial(Year(DateAdd("m",-1,Date())),Month(DateAdd("m",-1,Date())),1)
And Date()-Day(Date()) AND RedFlagged = True;

Nov 12 '05 #4

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

Similar topics

3
by: Norma | last post by:
I am trying to capture data in a date parameter query that spans from 1 to 3 months. I have a field that is a checkbox that notes whether or not this data is 'red flagged' (so you know, the red...
9
by: Colin McGuire | last post by:
Hi, I have an report in Microsoft Access and it displays everything in the table. One column called "DECISION" in the table has either 1,2, or 3 in it. On my report it displays 1, 2, or 3. I want...
3
by: bbdata | last post by:
what would be an equivalent of OnCurrent event/Forms , in detail section of the Report? i have a subreport with just one (visible)field, bounded to a query. subreport is in detail section of main...
1
by: MoreQsThanAs | last post by:
I want to include some summary data in a report section header. In the example below I want to put in the "Apples" section header the date of the sale of the last red apple. Everything I try only...
2
by: pripa | last post by:
#1 in my report i need to group my clients and print a color code "Green", "Red" and "Blue" above names of the clients depending on values in the order form. Is it possible to print it from the...
3
by: Tmuld | last post by:
Hello, I was provided a .rpt file which is Crystal Reports report. It opened with VS .NET 2003. On the left side in the Field Explorer - there are seveal categories - Database Fields -...
3
by: T | last post by:
I'm trying to determine the useage of varioius reports I have. I need the following to occur when a report is opened, get the name of the report, datetime, username. I created a tblLog...
6
by: tmoon3 | last post by:
Hello All, I have a report where it lista employees that need to have an eval done in the next 30 days. If the employee has a 3 month, 6 month or 12 month eval due in the next 30 days it lists...
0
by: Fidell | last post by:
I am using data report with ms access database. I want to the rptTextbox color to change based on the value of the the recordset field. Eg to appear red if the field is "FAIL" and black if it "PASS"....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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...

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.