How can I query on 2 dates in InfoPath

M

Meg

In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 
M

Meg

Thank you very much, this site definetly helped, However I still have a
question???

I already have a form and a main connection to my database in which InfoPath
writes back to that database. If I add a Field to that table in Access
(MyDate field) Is this going to mess my InfoPath Form up?

Will I still be able to Write back to it??

Help please!!!!

S.Y.M. Wong-A-Ton said:
Try using the technique described in this article:
http://enterprise-solutions.ikreate.nl/infopath2003/filter-repeating-table-date-range-rules.htm
---
S.Y.M. Wong-A-Ton


Meg said:
In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 
M

Meg

I have been trying to get this to work all day besides the question below, I
need to know how to add a Field (element) to the Main data source of the
InfoPath form (Step 7) of the site you refered me to. When I try to right
click on the group and try to add the field , the ADD is greyed out. I am
using 2007. My form was created using 2003 but we have upgraded to 2007.

Thanks for your help.

Meg said:
Thank you very much, this site definetly helped, However I still have a
question???

I already have a form and a main connection to my database in which InfoPath
writes back to that database. If I add a Field to that table in Access
(MyDate field) Is this going to mess my InfoPath Form up?

Will I still be able to Write back to it??

Help please!!!!

S.Y.M. Wong-A-Ton said:
Try using the technique described in this article:
http://enterprise-solutions.ikreate.nl/infopath2003/filter-repeating-table-date-range-rules.htm
---
S.Y.M. Wong-A-Ton


Meg said:
In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 
S

S.Y.M. Wong-A-Ton

No, adding the extra fields should not mess up your form; you should still be
able to write back to the database.
---
S.Y.M. Wong-A-Ton


Meg said:
Thank you very much, this site definetly helped, However I still have a
question???

I already have a form and a main connection to my database in which InfoPath
writes back to that database. If I add a Field to that table in Access
(MyDate field) Is this going to mess my InfoPath Form up?

Will I still be able to Write back to it??

Help please!!!!

S.Y.M. Wong-A-Ton said:
Try using the technique described in this article:
http://enterprise-solutions.ikreate.nl/infopath2003/filter-repeating-table-date-range-rules.htm
---
S.Y.M. Wong-A-Ton


Meg said:
In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 
S

S.Y.M. Wong-A-Ton

Right-click on "myFields" instead of the group and you should be able to add
the extra fields. You must not add the fields under the group, but under the
main node for the form template, so "myFields" in this case. Your InfoPath
version does not matter in this case.
---
S.Y.M. Wong-A-Ton


Meg said:
I have been trying to get this to work all day besides the question below, I
need to know how to add a Field (element) to the Main data source of the
InfoPath form (Step 7) of the site you refered me to. When I try to right
click on the group and try to add the field , the ADD is greyed out. I am
using 2007. My form was created using 2003 but we have upgraded to 2007.

Thanks for your help.

Meg said:
Thank you very much, this site definetly helped, However I still have a
question???

I already have a form and a main connection to my database in which InfoPath
writes back to that database. If I add a Field to that table in Access
(MyDate field) Is this going to mess my InfoPath Form up?

Will I still be able to Write back to it??

Help please!!!!

S.Y.M. Wong-A-Ton said:
Try using the technique described in this article:
http://enterprise-solutions.ikreate.nl/infopath2003/filter-repeating-table-date-range-rules.htm
---
S.Y.M. Wong-A-Ton


:

In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 
M

Meg

Thank you very much. You have been very helpful.

S.Y.M. Wong-A-Ton said:
No, adding the extra fields should not mess up your form; you should still be
able to write back to the database.
---
S.Y.M. Wong-A-Ton


Meg said:
Thank you very much, this site definetly helped, However I still have a
question???

I already have a form and a main connection to my database in which InfoPath
writes back to that database. If I add a Field to that table in Access
(MyDate field) Is this going to mess my InfoPath Form up?

Will I still be able to Write back to it??

Help please!!!!

S.Y.M. Wong-A-Ton said:
Try using the technique described in this article:
http://enterprise-solutions.ikreate.nl/infopath2003/filter-repeating-table-date-range-rules.htm
---
S.Y.M. Wong-A-Ton


:

In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 
M

Meg

OK, I don't mean to sound dumb, but.......

Again, I have been working on my form all day. I can add a field to my main
data connection and it still works.

My Problem is this: in the example on the site that you referenced, it
states that the main connection should be the Query (TasksSortedByDate),
however My Main connection is the actual table that I want info written back
to.(tbl_MeetingsActivity). -- This is a Menu driven application in InfoPath
and now I am setting up a button on the Menu for Reports. I have a detailed
report that lists all entries. I am now trying to get a report by Fiscal
Year and it only gives counts for the FY. I can do that fine in Access,
however I am trying to get it to work in InfoPath. The site you gave me is
helpful, however when I try to do this report by 2 different dates I am still
unsuccessful. I connected to the TasksSortedByDate) as a secondary
connection and I can get a list with the counts when I run this. But I want
the user to be able to enter 2 dates and the report generates with only the
counts for that timeframe. I cannot add the fields (startDate and endDate)
to the Secondary connection, but I was successful in adding them to the Main
Connection. My query is already set up to count by Tasks but I still cannot
get the Dates.

Am I asking too much?

Thanks for any help you can give me.

MEG

S.Y.M. Wong-A-Ton said:
No, adding the extra fields should not mess up your form; you should still be
able to write back to the database.
---
S.Y.M. Wong-A-Ton


Meg said:
Thank you very much, this site definetly helped, However I still have a
question???

I already have a form and a main connection to my database in which InfoPath
writes back to that database. If I add a Field to that table in Access
(MyDate field) Is this going to mess my InfoPath Form up?

Will I still be able to Write back to it??

Help please!!!!

S.Y.M. Wong-A-Ton said:
Try using the technique described in this article:
http://enterprise-solutions.ikreate.nl/infopath2003/filter-repeating-table-date-range-rules.htm
---
S.Y.M. Wong-A-Ton


:

In Access I can query on 2 date fields by doing the following:
Between [Begin Date "Example 10/01/07"] And [Completed Date "Example
09/30/08"]

However, when I try to connect to this query in InfoPath it won't let me.
So I took this out and I can connect to the query
The query in Acces is by Status and Type and it does a Sum of Producers and
a Sum of Total Attendance and does a count by Type. I want the form to ask
the user for the Begin Date and an End Date. But I can't figure out where to
put that in on InfoPath.

Can anyone help?

thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top