F
FP1
Some kind of zen thing in Access, maybe? I'm calling a procedure with an
optional paramter. I'm NOT passing that parameter in the calling procedure
and therefore the object should be "missing". Access returns False from
IsMissing, IsEmpty and IsNull, and of course I then get "object or with
variable not set" when I try to access it. Any ideas?
Sub check_for_records_added(oldDB As ADODB.Connection, newDB As
ADODB.Connection, updatedTable, outOfDateTable, keyfields As Collection,
Optional outkeyfields As Collection)
Dim outkeys As Collection
'irrelevant stuff snipped
If (IsMissing(outkeyfields) or Isnull(outkeyfields)) Then
Set outkeys = keyfields
Else
Set outkeys = outkeyfields '<--always true
End If
optional paramter. I'm NOT passing that parameter in the calling procedure
and therefore the object should be "missing". Access returns False from
IsMissing, IsEmpty and IsNull, and of course I then get "object or with
variable not set" when I try to access it. Any ideas?
Sub check_for_records_added(oldDB As ADODB.Connection, newDB As
ADODB.Connection, updatedTable, outOfDateTable, keyfields As Collection,
Optional outkeyfields As Collection)
Dim outkeys As Collection
'irrelevant stuff snipped
If (IsMissing(outkeyfields) or Isnull(outkeyfields)) Then
Set outkeys = keyfields
Else
Set outkeys = outkeyfields '<--always true
End If