N
nouveauricheinvestments
Hi,
I am trying to use the following code to populate a combo box.
Essentially what is happening here is I have a textbox on another form
and I am setting the ID = to the textbox's value's primary key by
looking it up in the table with the dlookup function. When I try to
set the RowSource property however, the only option I have in the
dropdown menu is DAT, rather than the values in the DAT field. DAT
stands for Date And Time by the way - I should see the relevant dates
from the table. What should I do differently?
Private Sub MyTickets_Click()
Dim ID As Integer
ID = DLookup("[ID]", "Trade_Specialists", "[Trade_Specialist] =
[Forms]![frmSplash]![User]")
Me.MyTickets.RowSourceType = "Field List"
Me.MyTickets.RowSource = "SELECT [Pending Tickets].DAT FROM [Pending
Tickets] WHERE " & _
"[Pending Tickets].ResearchedByID = " & ID & ";"
End Sub
I am trying to use the following code to populate a combo box.
Essentially what is happening here is I have a textbox on another form
and I am setting the ID = to the textbox's value's primary key by
looking it up in the table with the dlookup function. When I try to
set the RowSource property however, the only option I have in the
dropdown menu is DAT, rather than the values in the DAT field. DAT
stands for Date And Time by the way - I should see the relevant dates
from the table. What should I do differently?
Private Sub MyTickets_Click()
Dim ID As Integer
ID = DLookup("[ID]", "Trade_Specialists", "[Trade_Specialist] =
[Forms]![frmSplash]![User]")
Me.MyTickets.RowSourceType = "Field List"
Me.MyTickets.RowSource = "SELECT [Pending Tickets].DAT FROM [Pending
Tickets] WHERE " & _
"[Pending Tickets].ResearchedByID = " & ID & ";"
End Sub