Paul Cooke
Registered User.
- Local time
- Today, 21:44
- Joined
- Oct 12, 2001
- Messages
- 288
Hi guys could someone point me in the right direction please.
I need to calculate the numbers of days between two dates based on a selection in a combo and also add extra days to it.
e.g. the difference between 01-01-11 and 30-01-11 plus 9
What I have done so far is
but is doen't do anything and I have no idea why !
I have about 6 or 7 of these to do which is why I have set up a public function - i am assumming this is the best way to do this? each case will have a different 'plus days ' number
Any help or advice would be gratefully recieved
many thanks
I need to calculate the numbers of days between two dates based on a selection in a combo and also add extra days to it.
e.g. the difference between 01-01-11 and 30-01-11 plus 9
What I have done so far is
Code:
'Case function to calculate numbers of dayes between to periods
Select Case Nz(Me.cboProduct.Column(1), vbNullString)
'Malarone
Case "Malarone Tablet"
If Nz(cboProduct, 0) = "Malarone Tablet" Then
txtDurationOfStay = DateDiff("d", [txtStartDate], [txtEndDate])
End If
End Select
End Function
but is doen't do anything and I have no idea why !
I have about 6 or 7 of these to do which is why I have set up a public function - i am assumming this is the best way to do this? each case will have a different 'plus days ' number
Any help or advice would be gratefully recieved
many thanks