Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2005

Tip: Looking for answers? Try searching our database.

Query form with date ranges or dropdown

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GTP - 24 Aug 2005 01:36 GMT
Been looking for information on the web and in Microsoft. Still no luck.

I built a form in Infopath with an acess datasource. I want to query the
database by date range. How do I do this. There appears to be no date range
function, I can query by date only but no range.

If the user chooses not to query by date range, instead they can query by
customer. I want the query to be either by date range or by the company
dropdown. How do I accompish the either or?

Thanks,
Greg
Adam Harding - 24 Aug 2005 13:18 GMT
Design your query form and populate with query fields NOT data fields.

Then have a query button and it will choose whatever data you have entered
to search in those fields.

As far as i am aware if you design you query in your access dbase on the
date range thing then infopath can import the query i am not sure how but
give that a bash for this.

> Been looking for information on the web and in Microsoft. Still no luck.
>
[quoted text clipped - 8 lines]
> Thanks,
> Greg
Scott L. Heim [MSFT] - 24 Aug 2005 13:59 GMT
Hi Greg,

In order to query using "wildcards" or a date range, you will need to
construct the query string in code. The following Knowledge Base article
should provide a good start:

826992: How To: Use Wildcard Characters in an InfoPath Form Query
http://support.microsoft.com/default.aspx?scid=kb;EN-US;826992

You can use the premise in this article and simply modify this to use dates
from your form.

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 24 Aug 2005 14:03 GMT
Hi Greg,

If you run into issues implementing this, let me know as I can provide you
with sample steps using the Northwind database.

Best regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
GTP - 24 Aug 2005 19:52 GMT
Thanks for the reply. I am a real novice when it comes to code. I thought
there would be a simplier way of inserting two date pickers, and maybe a
condition or some sort of formula. I'm going to have a crack at the code but
as I said, I am a novice. Also, my Access database is much smaller than the
NWDB, I only have three tables, and I made a Query in Access for the Query
form in Infopath, I;m not sure if I actually had to make a Query in Access,
do I.

Thanks,
Greg

> Hi Greg,
>
[quoted text clipped - 7 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 24 Aug 2005 20:09 GMT
Hi Greg,

Unfortunately there is no way to do a "date range" query through the UI -
it will have to be custom code. As I mentioned, if you run into a wall let
me know and I will provide you with the steps to test this against the
Orders table in the Northwind sample database.

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
 
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.