Hi All
I have a query which gives me the data between two given dates.
Now when i run the query it gives me a message box to enter the date saying "Enter Parameter Value". I want to customize the message box in such a way that it should say "Enter date" insted of saying "Enter Parameter Value"
Is this possible. I am not quite sure about this how to work this out.
Please help
Regards
Manoj
10 2477
Hi All
I have a query which gives me the data between two given dates.
Now when i run the query it gives me a message box to enter the date saying "Enter Parameter Value". I want to customize the message box in such a way that it should say "Enter date" insted of saying "Enter Parameter Value"
Is this possible. I am not quite sure about this how to work this out.
Please help
Regards
Manoj
You can use the InputBox() function to put a custom message together for this purpose.
if you paste in the SQL for your query, we'll see if we can get the syntax right for you.
Another option would be to create a small form to allow your users to enter dates, then a button to launch the query. The query would then reference the fields on the form as criteria.
J
In Design View for the Query (the Query Grid) on the Criteria line, for the given field enter [Enter First Date]
or whatever! That's what will show when you run the Query.
Linq ;0)>
You can use the InputBox() function to put a custom message together for this purpose.
if you paste in the SQL for your query, we'll see if we can get the syntax right for you.
Another option would be to create a small form to allow your users to enter dates, then a button to launch the query. The query would then reference the fields on the form as criteria.
J
Hi JConsulting
I have written the following SQL Statement
SELECT sales.Date, *
FROM sales
WHERE (((sales.Date) Between [sales]![date]![txtFrom] And [sales]![date]![txtTo]))
ORDER BY sales.Date;
Hi JConsulting
I have written the following SQL Statement
SELECT sales.Date, *
FROM sales
WHERE (((sales.Date) Between [sales]![date]![txtFrom] And [sales]![date]![txtTo]))
ORDER BY sales.Date;
does this work for you then? if you have created a form, then the syntax for that would be [forms]![yourform]![Yourfield]
??
J
Thanks JConsulting
Its working. Thanks for your valuable reply.
Regards
Manoj
So this worked on my report. I wanted to filter by staff and month. What if I want the report to show all of the records? If I leave the boxes empty, it gives me no records.
So this worked on my report. I wanted to filter by staff and month. What if I want the report to show all of the records? If I leave the boxes empty, it gives me no records.
Add "Or Is Null" to the Criteria.
Ex:
[Your message here] Or is Null
Here is my sql after I had added is null to both criteria. Still get a blank report. - SELECT tblJobHours.ID, tblJobHours.HoursWorked, tblJobHours.Month, tblJobHours.Year, tblJobHours.ClientID, tblJobHours.ECId, qryClientName.ClientName, qryStaffName.StaffName
-
FROM qryClientName INNER JOIN (qryStaffName INNER JOIN tblJobHours ON qryStaffName.ID=tblJobHours.ECId) ON qryClientName.ID=tblJobHours.ClientID
-
WHERE (((tblJobHours.Month)=Forms!frmReportInfo!Combo2) AND ((qryStaffName.StaffName)=Forms!frmReportInfo!Combo11)) Or (((tblJobHours.Month) Is Null) AND ((qryStaffName.StaffName) Is Null));
Here is my sql after I had added is null to both criteria. Still get a blank report. - SELECT tblJobHours.ID, tblJobHours.HoursWorked, tblJobHours.Month, tblJobHours.Year, tblJobHours.ClientID, tblJobHours.ECId, qryClientName.ClientName, qryStaffName.StaffName
-
FROM qryClientName INNER JOIN (qryStaffName INNER JOIN tblJobHours ON qryStaffName.ID=tblJobHours.ECId) ON qryClientName.ID=tblJobHours.ClientID
-
WHERE (((tblJobHours.Month)=Forms!frmReportInfo!Combo2) AND ((qryStaffName.StaffName)=Forms!frmReportInfo!Combo11)) Or (((tblJobHours.Month) Is Null) AND ((qryStaffName.StaffName) Is Null));
Substitute "tblJobHours.Month Is Null" with "Forms!frmReportInfo!Combo2 Is Null" and "qryStaffName.StaffName Is Null" with "Forms!frmReportInfo!Combo11 IS Null" and see if it works.
I added this to the end and now I can filter by staff and date, staff, date or all info. Thank you very much, works great -
Or ((((tblJobHours.Month)=Forms!frmReportInfo!Combo2) And ((Forms!frmReportInfo!Combo11) Is Null)) Or (((qryStaffName.StaffName)=Forms!frmReportInfo!Combo11) And ((Forms!frmReportInfo!Combo2) Is Null)));
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chris Kilmer |
last post by:
I would like to be able to customize the path structure that VS.NET
2003 creates for projects.
1. I'd like to be able to create a project without VS.NET creating a
folder for that project. ...
|
by: Shabam |
last post by:
When I set validateRequest="true", and a user tries to submit html into the
form, the server returns with a huge error page detailing what wasn't
allowed.
Is there a way to customize just this...
|
by: deko |
last post by:
I've found that the "Remove Filter/Sort" selection in the Shortcut menu
(displayed on right click) produces ugly, untrappable errors, even though
"Allow Filters" is set to No in the subform.
...
|
by: deko |
last post by:
The below code dials a phone number when the subform datasheet cell
containing the number is double clicked. The problem is that the dialer
application (c:\windows\dialer.exe) pops up windows on...
|
by: JMCN |
last post by:
hi
i'm having a problem with the customize a shortcut menu. i read the ms
office assistance: customize a shortcut menu/delete a command or add
to a shortcut menu and followed the simple...
|
by: George |
last post by:
Is there a way to customize the open file common dialog? I am trying to
modify the button text so I can create a delete file common dialog. I need
the same functionality of the open file common...
|
by: msnews.microsoft.com |
last post by:
Hi All,
As we have seen the customize toolbar windows in almost all windows programs
(Please right click on the toolbar portion in Microsoft Word and click on
customize).
I would like to add...
|
by: James Lennon |
last post by:
How can I customize a DataGrid row based on the row
properties. For istance if a column is 0 make the row
bold or red. I have only been able to format a datagrid
based on columns.
James
|
by: DC |
last post by:
Hi,
there is a 500;13 page one can configure in the website properties, but
..Net Framework 1.1 also delivers the "server too busy" message
sometimes and the IIS custom error page does not seem...
|
by: Sky |
last post by:
I have an Access 2003 front-end database with custom toolbars. The toolbars
work fine.
One annoying feature is that at the far right edge of each custom toolbar
there a small dropdown arrow....
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
| |