B
Brad Pears
If a function obtains two values you want to use, how do you return them to
the calling procedure??
In teh following sample code, I have only returned ONE value as show....
sub sub1
itemNo = somevalue
strDesc = GetDesc(itemNo)
end sub
function GetDesc(ItemNo as integer)
dim RS as recordset
dim strSQL as string
strSQL = "select Description , Price from Items where ItemNo = " &
ItemNo
' Obtain description and price
set RS = curentdb.openrecordset(strSQL)
' Return Description
GetDesc = strDescription
end function
The above example shows the returning of the description only. But what if I
want to also return price to the calling procedure? How do I do that simply?
Thanks,
Brad
the calling procedure??
In teh following sample code, I have only returned ONE value as show....
sub sub1
itemNo = somevalue
strDesc = GetDesc(itemNo)
end sub
function GetDesc(ItemNo as integer)
dim RS as recordset
dim strSQL as string
strSQL = "select Description , Price from Items where ItemNo = " &
ItemNo
' Obtain description and price
set RS = curentdb.openrecordset(strSQL)
' Return Description
GetDesc = strDescription
end function
The above example shows the returning of the description only. But what if I
want to also return price to the calling procedure? How do I do that simply?
Thanks,
Brad