What fields are in your database table and what fields are your showing on
your form? Are you using one field for the days taken so far and another one
for the days currently taken? Or are you using only 1 field for both?
As I see it: You need to have a field in your database table to save the
days already taken in. Then you have to add a field to your form (this field
does not have to be bound to the database), to fill in the amount of days you
are going to take (2 days in this case). Then you must add a rule on this
field to set the value of the "days already taken" field to whatever value is
in the "days already taken" field plus what is filled in in the "amount of
days you are going to take" field. The formula to set the value of the "days
already taken" field is very simple: daysTakenField + .
To add a field that is not bound to a database: Go to the "Data Source"
pane, select the Main data source, and add the field to the Main data source.
Then drag-and-drop this field from the "Data Source" pane onto your form.
---
S.Y.M. Wong-A-Ton
> I am new to Infopath and have created a form linked to Access to track
> vacation days. I am trying to find out what formula to use for the field
[quoted text clipped - 4 lines]
> group told me it needed to be done on the Infopath side versus the Access
> side. Any input would be greatly appreciated!
Margie@ABI - 14 Nov 2006 17:36 GMT
I have separate fields for both -- both in the database and the form. There
are date picker fields and then a field to enter the number of requested
days. Further down the form is the field for Days Taken Prior to the
Request. That is the field I need to update when you run a query to locate
your info in the database. As is exists now, you open the form and hit the
query field to retrieve your data. It automatically updates withthe last
form you completed, which you then type over. At that point is when I need
the "Days Taken Prior To" field to update with the last number of days
requested before you request more. Does this make sense? The only formula
currently applied to the "Days Requested" field is linked to the bottom line
total of all days.
> What fields are in your database table and what fields are your showing on
> your form? Are you using one field for the days taken so far and another one
[quoted text clipped - 23 lines]
> > group told me it needed to be done on the Infopath side versus the Access
> > side. Any input would be greatly appreciated!
Margie@ABI - 14 Nov 2006 21:58 GMT
Please disregard my earlier second questions. Your initial recommendations
worked perfectly! Thank you SOOOOOO much. I truly appreicate the help.
Margie@ABI
> What fields are in your database table and what fields are your showing on
> your form? Are you using one field for the days taken so far and another one
[quoted text clipped - 23 lines]
> > group told me it needed to be done on the Infopath side versus the Access
> > side. Any input would be greatly appreciated!
S.Y.M. Wong-A-Ton - 15 Nov 2006 06:56 GMT
No worries! Glad you finally got it to work.
---
S.Y.M. Wong-A-Ton
> Please disregard my earlier second questions. Your initial recommendations
> worked perfectly! Thank you SOOOOOO much. I truly appreicate the help.
[quoted text clipped - 28 lines]
> > > group told me it needed to be done on the Infopath side versus the Access
> > > side. Any input would be greatly appreciated!