Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / August 2007

Tip: Looking for answers? Try searching our database.

Show user input in message box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ironwood9 - 23 Aug 2007 21:54 GMT
I have a report whose source is a query with criteria that is based on user
input - when the query is run ( or the report ), a message box pops up and
says "Enter partial description" - if a match is found in the specified field,
then the records are displayed - there is error handling if no records are
found, with a canned message hard-coded stating "NO RECORDS FOUND"

Is there a way to have whatever string the user entered as criteria pop up ?

For example, if the user typed "March," and there were no matches, then the
message would say:

No records found with "March" in the description, and so on.
Mark Burns - 23 Aug 2007 23:38 GMT
> I have a report whose source is a query with criteria that is based on user
> input - when the query is run ( or the report ), a message box pops up and
[quoted text clipped - 8 lines]
>
> No records found with "March" in the description, and so on.
Mark Burns - 23 Aug 2007 23:46 GMT
Hmmm...

That may not be so easy.
If what you are doing is to build a query similar to this:
SELECT * FROM MyTable WHERE myDescField Like "*" & [Enter text Here] & "*";
and trapping the NO DATA Event in the report, that may not be so easy to do.
I don't know if you can use the report's object model to retrieve that
dynamically generated Query Parameter value.

If that is the functionality you require, then you may have to change how
you do things entirely.

You may need to open a form or run some code to feed the reprt its query and
its prompt text via the docmd.openreport method call (you can supply the
parameter as the OpenArgs parameter value (or as part of it) and you can the
add some code to your NODATA event to retrieve and use the me.openargs value
(if present).

> I have a report whose source is a query with criteria that is based on user
> input - when the query is run ( or the report ), a message box pops up and
[quoted text clipped - 8 lines]
>
> No records found with "March" in the description, and so on.
ironwood9 - 24 Aug 2007 01:06 GMT
Mark,
Thanks so much !
Steve

>Hmmm...
>
[quoted text clipped - 19 lines]
>>
>> No records found with "March" in the description, and so on.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.