Pass the value of a combo box to a calling function

BittenApple
BronzeLounger
Posts: 1498
Joined: 01 Mar 2015, 02:03

Pass the value of a combo box to a calling function

Post by BittenApple »

:hairout: :thankyou: :thankyou:

Hello all,

How to pass the value of a combo box to a calling function on VBA code Window.

my combo box is on Main form and has two fields HosID, HosName. The combo box shows the list of hosName.

I have a calling function.

Call AuditChanges( )

I have to capture the current Record ID which is embed in combo box and pass it to above function.
What should be placed inside of parenthesis?

Regards,
tibb

User avatar
HansV
Administrator
Posts: 78589
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pass the value of a combo box to a calling function

Post by HansV »

For example

Call AuditChanges(Me.Combo1)

if Combo1 is the namer of the combo box.
Best wishes,
Hans

BittenApple
BronzeLounger
Posts: 1498
Joined: 01 Mar 2015, 02:03

Re: Pass the value of a combo box to a calling function

Post by BittenApple »

Thanks!