Computing.Net > Forums > Programming > Access 2000 Calculations

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Access 2000 Calculations

Reply to Message Icon

Name: DD
Date: April 14, 2003 at 08:08:06 Pacific
OS: Win 2K
CPU/Ram: 128 MB
Comment:

Greetings,
I have two combo boxes AppStatus (with drop down NEW, REDETERM etc) & EligStatus (with drop down ELIG, DENIED etc) depending on what the user selects from each field, EligDays = the difference between two fields.

I'm new for programming. How do I get the result, (work days) not counting weekends, automatically to be filled in EligDays field?

Thanks,

DD


The following is the code i have please comment:

Private Sub AppStatus_AfterUpdate()

If [AppStatus].Value = "NEW" And [EligStatus].Value = "ELIG" Then
EligDays.Value = DateDiff("d", [AppRec], [EligDate])


ElseIf [AppStatus].Value = "NEW" And [EligStatus].Value = "DENIED" Then
EligDays.Value = DateDiff("d", [AppRec], [EligDate])


ElseIf [AppStatus].Value = "NEW" And [EligStatus].Value = "REACTIVATE" Then
EligDays.Value = DateDiff("d", [Reassess], [EligDate])


ElseIf [AppStatus].Value = "REDETERM" And [EligStatus].Value = "ELIG" Then
EligDays.Value = DateDiff("d", [RedetDue], [EligDate])


ElseIf [AppStatus].Value = "REDETERM" And [EligStatus].Value = "DENIED" Then
EligDays.Value = DateDiff("d", [RedetDue], [EligDate])

ElseIf [AppStatus].Value = "REDETERM" And [EligStatus].Value = "REACTIVATE"
Then
EligDays.Value = DateDiff("d", [Reassess], [EligDate])

Else
EligDays.Value = Null

End If


End Sub




Sponsored Link
Ads by Google

Response Number 1
Name: mark
Date: April 15, 2003 at 01:35:08 Pacific
Reply:

there is an excel command called networkdays,

if you go on the microsoft site, look up that command, it will also point you to the vba code for the same function in access, thats where i got it from anyway.



0
Reply to Message Icon

Related Posts

See More


How to configure for asp.... VB accessing Access mdb f...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Access 2000 Calculations

Access 2000 Calculations www.computing.net/answers/programming/access-2000-calculations/5321.html

Access 2000 Date/Time help www.computing.net/answers/programming/access-2000-datetime-help/2783.html

Access 2K Calculations www.computing.net/answers/programming/access-2k-calculations/6060.html