A question about field calculations

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a tab I have 7 date fields named "SLA_Date1" to "SLA_Date7". Next to 6 I
have unbound fields like this:

A
B C
D E
F G
H I
J K
L M

A SLA_Date1
B SLA_Date2
..
..
..
L SLA_Date7

Difference between SLA_Date1 and other dates:

C = WorkingDays2([SLA_Date1],[SLA_Date2])
E = WorkingDays2([SLA_Date1],[SLA_Date3])
..
..
..
M = WorkingDays2([SLA_Date1],[SLA_Date7])

As an example if I fill in the first three dates, I get...

11/07/07
11/07/07 0
12/07/07 0
1

instead of...

11/07/07
11/07/07 0
12/07/07 1

All the references are correct so why is the calculation wrong?

cheers
 
Since WorkingDays2 isn't a built-in Access function, it's obviously
something you've added to your application. Does it do the correct
calculations?
 
It does do the correct calculation: difference between two dates without
weekends or public holidays. I think you misunderstand my problem. Here is
another example of what is happening on the form:

SLA_Date 1 07/06/07
SLA_Date 2 12/06/07 3
SLA_Date 3 3

The second "3" shouldn't even be there. It should contain "#Error" because
there isn't a date in which to do the calculation.
 
I've sorted it out.




Douglas J. Steele said:
Since WorkingDays2 isn't a built-in Access function, it's obviously
something you've added to your application. Does it do the correct
calculations?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


scubadiver said:
In a tab I have 7 date fields named "SLA_Date1" to "SLA_Date7". Next to 6
I
have unbound fields like this:

A
B C
D E
F G
H I
J K
L M

A SLA_Date1
B SLA_Date2
.
.
.
L SLA_Date7

Difference between SLA_Date1 and other dates:

C = WorkingDays2([SLA_Date1],[SLA_Date2])
E = WorkingDays2([SLA_Date1],[SLA_Date3])
.
.
.
M = WorkingDays2([SLA_Date1],[SLA_Date7])

As an example if I fill in the first three dates, I get...

11/07/07
11/07/07 0
12/07/07 0
1

instead of...

11/07/07
11/07/07 0
12/07/07 1

All the references are correct so why is the calculation wrong?

cheers
 

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

Back
Top