User data type

  • Thread starter Thread starter Louis
  • Start date Start date
L

Louis

I can use recordset to pass any field/column to
sub/function. How can I design to the user data type like
below in order to conbine both Subs:

sub mySearch (Shpmt as Shipment)
.....
end sub
Sub mySearch(myPart as Part)
.....
end sub

type Shipment
ID as long
part as string *30
end type

type Part
PartID as long
Description as string *50
end type

Thank you very much for your help,
Louis
 
Louis,

Public Sub mySearch(myShipment As Shipment, myPart As Part)
Debug.Print myShipment.ID; myShipment.Part
Debug.Print myPart.Description; myPart.PartID
End Sub

'You MUST supply both arguments. You can't have optional Type arguments.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Back
Top