Hi everybody. I am trying to populate a combo box in a form using vba but don't know how. I tried messing around with the dlookup but could not get it to work.
Can someone give me an example?
Hi everybody. I am trying to populate a combo box in a form using vba but don't know how. I tried messing around with the dlookup but could not get it to work.
Can someone give me an example?
What exactly are you going to do with the Combobox? For most tasks you can use the Combobox Wizard to set one up.
Linq ;0)>
Hi
Basically I have a table called myCDS that has three rows: ID, Artist, Tracks
I am trying to make a form in access. Their has to be a combo box that uses code to show the Artist of the current record. I have to use access, I am trying to learn Access and VBA.
Here is what I got so far:
Private Sub Form_Load()
Me.Caption = "Today is " & Format$(Date, "dddd mmm-d-yyyy")
Me.RecordSource = "tblStore"
cbo.RowSourceType = "Table/Query"
cbo.RowSource = "SELECT Store FROM tblStore"
End Sub
Basically I would now like to highlight the value it is currently on
Your combo has the column "Store" associated to it and no other. You can display this column in your combo by binding it to your combo.
cbo.BoundCollumn = "1"
I usually just use the properties window for this. I think you need the parenthesis.