M
mscertified
I'd like to set up a function to read a record from a table either by the
primary key (long) or secondary index (text). So I need 2 optional parameters
and depending which is passed, read via the appropriate key.
Can someone give me sample code for processing the optional parameters?
Will this do it?
Private Sub GetData(Optional lngID As Long = 0, Optional strID as string =
"") as boolean
If lngID = 0 Then
....
else
....
end if
end sub
primary key (long) or secondary index (text). So I need 2 optional parameters
and depending which is passed, read via the appropriate key.
Can someone give me sample code for processing the optional parameters?
Will this do it?
Private Sub GetData(Optional lngID As Long = 0, Optional strID as string =
"") as boolean
If lngID = 0 Then
....
else
....
end if
end sub