![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Got a function: ================================================== =============== Public Function ResetDateFirst_GetOrCompute( _ ByVal theCouponResetFrequencyID As Long, _ ByVal theIssueDate As Date, _ ByVal theSecurityID As Long, _ ByVal theWorkSwitch As Boolean, _ Optional ByVal theSettlementDate As Date _ ) As Variant ================================================== =============== When calling the function as in: ================================================== =============== ?ResetDateFirst_GetOrCompute(12,#10/21/2011#,25431,False) ================================================== =============== I get ============================== ?ismissing(theSettlementDate) False ============================== But I have not passed anything. In fact, IsDate(theSettlementDate) = True, and if I operate using theSettlementDate, it actually works as if I had passed a date of "12:00:00 AM". I must be doing something wrong.... But what? -- PeteCresswell |
#3
| |||
| |||
|
|
The IsMissing function can only be used with variant data types. That's because variants have a 'missing' flag bit and ordinary types don't. So you can either declare theSettlementDate as variant and use IsMissing to check for existence, then convert to date using the Cdate function or: Set a default value of (say) 01/01/1980 and check for that. If you get a hit, the argument is missing: Optional theSettlementDate As Date = "01/01/1980" |
![]() |
| Thread Tools | |
| Display Modes | |
| |