G
Guest
Hi guys,
I have 4 order forms that require the same actions
I would like to make a subroutine that I can pass the form object to
objectify these actions
I have a call to a procedure:
Library.SetOrderLineFields (Me)
and the procedure:
Public Sub SetOrderLineFields(frm As Variant)
' Set all fields from Items combo box
With frm
' Actions for setting fields
Dim sItemTable As String
' If item is a group item
sItemTable = .Item.Column(6))
etc...
I have tried changing the argument type from as form /as object/as variant
with the argument as a form or object the error:
type mismatch on the call subroutine line
if I make the argument a variant I get an error on the combo box field array
Wrong number of arguments or invalid property assignment (Error 450)
on the following line
..Item.Column(6)
not sure how to accomplish this,
Thanks in advanced
david
I have 4 order forms that require the same actions
I would like to make a subroutine that I can pass the form object to
objectify these actions
I have a call to a procedure:
Library.SetOrderLineFields (Me)
and the procedure:
Public Sub SetOrderLineFields(frm As Variant)
' Set all fields from Items combo box
With frm
' Actions for setting fields
Dim sItemTable As String
' If item is a group item
sItemTable = .Item.Column(6))
etc...
I have tried changing the argument type from as form /as object/as variant
with the argument as a form or object the error:
type mismatch on the call subroutine line
if I make the argument a variant I get an error on the combo box field array
Wrong number of arguments or invalid property assignment (Error 450)
on the following line
..Item.Column(6)
not sure how to accomplish this,
Thanks in advanced
david