Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 = NullEnd If
End Sub

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.

![]() |
How to configure for asp....
|
VB accessing Access mdb f...
|

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