Jumat, 23 Februari 2018

[MS_AccessPros] Add Item to combobox in vba

 

I am trying to add a an item to my combo box called cmbChooseCommunity. Its record source is 


SELECT tlkpCommunity.CommunityID, tlkpCommunity.CommunityName FROM tlkpCommunity;

And at the top of the list I would like add the word "All" in case the user wants to see all the communities an not just a specific community.

This is where I am at...

Private Sub cmbChooseListingView_AfterUpdate()

  Select Case Me.cmbChooseListingView

    Case 2

      Me.lblCommunityView.Visible = True

      Me.cmbChooseCommunity.Visible = True

      cmbChooseCommunity.AddItem Item:="All", Index:=0

 

    Case Else

      Me.lblCommunityView.Visible = False

      Me.cmbChooseCommunity.Visible = False

     

    End Select

   

End Sub


It bombs when I try to add the item like this because it says the record source has to be Field List.

Any ideas,

Thank you,

Art Lorenzini
Sioux Falls, SD


__._,_.___

Posted by: dbalorenzini@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar