How to populate a ComboBox with a Recordset using VBA

前端 未结 6 758
星月不相逢
星月不相逢 2021-02-15 13:34

There is some literature available at expert\'s exchange and at teck republic about using the combobox.recordset property to populate a combobox in an Access form.

The

6条回答
  •  清酒与你
    2021-02-15 13:58

    A combo box control does not have a recordset property. It does have a RowSource property but Access is expecting a SQL string in there.

    You can change the RowSourceType to the name of a user defined "callback" function. Access help will give you more information including sample code by positioning yourself on the RowSourceType and pressing F1. I use this type of function when I want to give the users a list of available reports, drive letters, or other data that is not available via a SQL query.

    I don't understand what you mean by your third paragraph with respect to using data directly from the server side. Or rather I don't understand what the problem is with using standard queries.

提交回复
热议问题