Ac2002: Populating Comboboxes dynamically

  • Thread starter Thread starter Roger Whitehead
  • Start date Start date
R

Roger Whitehead

I'm trying to populate comboboxes with the same purpose on different forms
dynamically, by a call (Using the Form_Current of each form):

GetSurname Forms("Household subform New"), Me.cboSurname
which calls:

Sub GetSurname(objForm As Form, objCtrl As control)
'Error here ->
with objForm!objCtrl

'Error (2465) is "MyDatabase can't find the field objCtrl
referred to in your expression"


Any contributions gratefully considered. Thanks
 
Since you're already passing in a reference to the combobox, I don't believe
you need to refer to the form in your with statement.
try this:

with objCtrl
....
 
Back
Top