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

Dates/Name breakdown

I have a requested date field which is a date, I need to create a form
with start requested date and end requested date with who it was sent
to......

So I need 2 date boxes in a popup form with these dates in, then press
a button to run a report with these dates in the report.... with a
selection of 10 different staff combo box...

when the dates have been selected and the persons name has been
selected then this report can be run, therefore the report must have a
criteria of the 2 dates and the person's name.

Please help as I have tried several ideas but I know that they are not
the right ones.

Elaine
Nov 16 '07 #1
2 1710
On Nov 16, 9:57 am, Elainie <Elaine.Macint...@bsc.wales.nhs.ukwrote:
I have a requested date field which is a date, I need to create a form
with start requested date and end requested date with who it was sent
to......

So I need 2 date boxes in a popup form with these dates in, then press
a button to run a report with these dates in the report.... with a
selection of 10 different staff combo box...

when the dates have been selected and the persons name has been
selected then this report can be run, therefore the report must have a
criteria of the 2 dates and the person's name.

Please help as I have tried several ideas but I know that they are not
the right ones.

Elaine
This is actually fairly easy. It the click event of the button, you
would fill a temporary table with a custom INSERT INTO query, and then
call the report that would be made off of that table. For example:

dim sSQL as string
dim db as dao.database
set db=currentsdb()
db.execute "DELETE * FROM tblReportSales"
sSQL="INSERT INTO tblReportSales SELECT [Name],[InvoiceNo],
[InvoiceDate],[Total] FROM tblCustomer INNER JOIN tblSales ON
tblCustomer.[CustomerNo]=tblSales.[CustomerNo] WHERE [FromDate] >= #"
& txtFromDate & "# AND [ToDate] <= #" & txtToDate & "# AND tblSales.
[CustomerNo] = " & cmbCustomer & ";"
db.execute sSQL
docmd.OpenReport "Sales"

This code assumes a customer table and a separate sales table where
sales are associated to customers with a numeric customer id. It also
assumes the table tblReportSales already exists with the proper field
names and structures. It also assumes that the combo-box cmbCustomer
returns the customer id number.
Nov 16 '07 #2
Create a pop-up form (frmFilterReport) with 3 unbound controls. One text
box (txtStart and txtEnd) for each date and one combo box (cmbStaff) for the
recipient. Add a command button to print your report.

Create a query that contains the tables/fields needed for the report .
Set the [request date] criteria to: Between frmFilterReport!txtStart and
frmFilterReport!txtEnd.
Set the [staff] criteria to:
Like(IIF(frmFilterReport!cmbStaff=null,"*",frmFilt erReport!cmbStaff))

Set the record source of your report to the above query.
You probably should set a default date range for your filter form so that
when the staff filter is empty, all records are returned.

-Ed

"Elainie" <El**************@bsc.wales.nhs.ukwrote in message
news:8f**********************************@d50g2000 hsf.googlegroups.com...
>I have a requested date field which is a date, I need to create a form
with start requested date and end requested date with who it was sent
to......

So I need 2 date boxes in a popup form with these dates in, then press
a button to run a report with these dates in the report.... with a
selection of 10 different staff combo box...

when the dates have been selected and the persons name has been
selected then this report can be run, therefore the report must have a
criteria of the 2 dates and the person's name.

Please help as I have tried several ideas but I know that they are not
the right ones.

Elaine

Nov 17 '07 #3

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

Similar topics

8
by: netsurfer | last post by:
Hi: Have a question on making the date automatically filled in by what the user enters in by the date at the top. The date entered at the top would most likely be on a Wednesday then I need...
22
by: mike | last post by:
If I had a date in the format "01-Jan-05" it does not sort properly with my sort routine: function compareDate(a,b) { var date_a = new Date(a); var date_b = new Date(b); if (date_a < date_b)...
1
by: Alicia | last post by:
I basically wanted something that would do a count of the dates, then group them by their week name.. BEFORE: Resource Date Total number of times that date Appeared (Count) 4/3/03 ...
0
by: BuddyWork | last post by:
Hello, I want to know if there any good tools out there which will show me a breakdown of the memory allocation in Gen 2 heap, basically a breakdown by object is what I'm looking for. The...
2
by: serge | last post by:
/* Subject: How best to use BETWEEN Begin and End Dates to find out if an employee was/is member of any group for a certain date range? You can copy/paste this whole post in SQL Query Analyzer...
7
by: evilcowstare via AccessMonster.com | last post by:
Hi, I have searched the forum for answers on this and to be honest as a novice I find it a bit confusing so apologies if it is simple. There are some searches that I want to apply to my database....
3
by: Daron | last post by:
Is it possible to use SQL to take a field, and break it down by denominations? I would like to take a field, and then break this out into the number of bills($100's, $50's, etc) I would need:...
5
by: jorgedelgadolopez | last post by:
Hi all, I am using the xpathnavigator evaluate function on .net (xpath 1 right?). Now I need to expand the code to do multiple contains, compare dates (such as 'before', 'between' and 'after'),...
1
by: Elainie | last post by:
I have a combo box with several names, once a name is selected then it goes and gets a report of the name of the person that has been selected. I would like to put this and date selection on one...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.