cipriano555
asked on
Access 2013 VBA problem refreshing a list box
I am developing an Access application. I read data from a sql server table and populate an access table which is used as the data source for a combo box. After the application runs some of the retrieval process, the new data is in the Access table, but is not reflected in the combo box which just has values like #DELETED. I'm pretty sure the combo box just needs to be re-queried with a statement like this:
cboCompanyName.Requery
The combo box is not on the same form as the one that needs to run this query and I get an error that says object error 424 Object needed. I think I need to use a fully qualified reference to the combo box. How? I don't see any name property for the form, I don't know what the form is named. It does have a label (which has a blank in it), and I have tried something like this:
[Company Selection].cboCompanyName. Requery
and
[Company Selection]!cboCompanyName. Requery
Which do not work. Do forms have a name property? How can I find it (if it does)? How to I reference this combo box from a form that is not it's container?
Thanks,
Cipriano
cboCompanyName.Requery
The combo box is not on the same form as the one that needs to run this query and I get an error that says object error 424 Object needed. I think I need to use a fully qualified reference to the combo box. How? I don't see any name property for the form, I don't know what the form is named. It does have a label (which has a blank in it), and I have tried something like this:
[Company Selection].cboCompanyName.
and
[Company Selection]!cboCompanyName.
Which do not work. Do forms have a name property? How can I find it (if it does)? How to I reference this combo box from a form that is not it's container?
Thanks,
Cipriano
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad it worked. Please choose the answer that helped you and close the question.
ASKER