Passing a ComboBox as a parameter in Access 2003

T

Tom Manuel

I'm trying to pass a ComboBox as a parameter.

Private Sub GetBox(ByRef cbox as ComboBox)
debug.print cbox.name
end sub

private Sub SendBox
call GetBox(cboMyComboBox)
debug.print cboMyComboBox.name
end sub

Access says the combo box is null in GetBox
The debug.print statement in SendBox works

How do you pass a combo box as a parameter?

Tom
 
M

MSAccess Program Error

I tried this and it works.
Running W2K pro w/ Access 2000.
Try passing as Control?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top