ComboBox.Dropdown 方法 (Access)ComboBox.Dropdown method (Access)

您可以使用 Dropdown 方法強制指定的下拉式方塊中要] 下拉式清單。You can use the Dropdown method to force the list in the specified combo box to drop down.



_運算式_代表**ComboBox** 物件的變數。expression A variable that represents a ComboBox object.

傳回值Return value



例如,當廠商所撰寫的程式碼控制項於資料輸入期間取得焦點時,您可以使用此方法讓列出程式碼的下拉式方塊下拉顯示。For example, you can use this method to cause a combo box listing vendor codes to drop down when the vendor code control receives the focus during data entry.

如果指定的下拉式方塊控制項尚未取得焦點,便會發生錯誤。If the specified combo box control doesn't have the focus, an error occurs. 使用此方法如同在控制項取得焦點時按下 F4 鍵。The use of this method is identical to pressing the F4 key when the control has the focus.


下列範例顯示如何使用Dropdown方法在GotFocus事件程序可強制名為SupplierID收到焦點時的下拉式方塊。The following example shows how you can use the Dropdown method within the GotFocus event procedure to force a combo box named SupplierID to drop down when it receives the focus.

Private Sub SupplierID_GotFocus() 
End Sub

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.