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

customize message box

manoj9849967222
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
Sep 8 '07 #1
10 2477
JConsulting
603 Expert 512MB
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
Sep 8 '07 #2
missinglinq
3,532 Expert 2GB
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)>
Sep 8 '07 #3
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;
Sep 8 '07 #4
JConsulting
603 Expert 512MB
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
Sep 10 '07 #5
Thanks JConsulting

Its working. Thanks for your valuable reply.

Regards
Manoj
Sep 11 '07 #6
rcollins
234 100+
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.
Nov 7 '07 #7
fd1
38
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
Nov 7 '07 #8
rcollins
234 100+
Here is my sql after I had added is null to both criteria. Still get a blank report.
Expand|Select|Wrap|Line Numbers
  1. SELECT tblJobHours.ID, tblJobHours.HoursWorked, tblJobHours.Month, tblJobHours.Year, tblJobHours.ClientID, tblJobHours.ECId, qryClientName.ClientName, qryStaffName.StaffName
  2. FROM qryClientName INNER JOIN (qryStaffName INNER JOIN tblJobHours ON qryStaffName.ID=tblJobHours.ECId) ON qryClientName.ID=tblJobHours.ClientID
  3. WHERE (((tblJobHours.Month)=Forms!frmReportInfo!Combo2) AND ((qryStaffName.StaffName)=Forms!frmReportInfo!Combo11)) Or (((tblJobHours.Month) Is Null) AND ((qryStaffName.StaffName) Is Null));
Nov 8 '07 #9
fd1
38
Here is my sql after I had added is null to both criteria. Still get a blank report.
Expand|Select|Wrap|Line Numbers
  1. SELECT tblJobHours.ID, tblJobHours.HoursWorked, tblJobHours.Month, tblJobHours.Year, tblJobHours.ClientID, tblJobHours.ECId, qryClientName.ClientName, qryStaffName.StaffName
  2. FROM qryClientName INNER JOIN (qryStaffName INNER JOIN tblJobHours ON qryStaffName.ID=tblJobHours.ECId) ON qryClientName.ID=tblJobHours.ClientID
  3. 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.
Nov 8 '07 #10
rcollins
234 100+
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
Expand|Select|Wrap|Line Numbers
  1. Or ((((tblJobHours.Month)=Forms!frmReportInfo!Combo2) And ((Forms!frmReportInfo!Combo11) Is Null)) Or (((qryStaffName.StaffName)=Forms!frmReportInfo!Combo11) And ((Forms!frmReportInfo!Combo2) Is Null)));
  2.  
Nov 8 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

3
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. ...
1
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...
1
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. ...
14
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...
2
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...
23
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...
5
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...
1
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
7
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...
0
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....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
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
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...
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...
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
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
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
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.