I was just starting to figure out recordsets and ADO stuff in Excel when I thought I would try it in Access. I want to start out slow by simply adding a list of partnumbers to a list box from an AS400 database. Can someone bump me in the right direction. I'm trying to use the Object Browser but so far that's over my head and I'm totally lost.
Private Sub Command2_Click()
Dim cnt As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strSQL As String
cnt.Open "DSN=AMES01"
strSQL = "SELECT MFRFMR02 FROM DPNEW"
Me.List0.RowSource = cnt.Execute(strSQL)
MsgBox "Done."
End Sub
Thanks, Rib
Bartender:Hey aren't you that rope I threw out an hour ago?
Rope:No, I'm a frayed knot.
Private Sub Command2_Click()
Dim cnt As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strSQL As String
cnt.Open "DSN=AMES01"
strSQL = "SELECT MFRFMR02 FROM DPNEW"
Me.List0.RowSource = cnt.Execute(strSQL)
MsgBox "Done."
End Sub
Thanks, Rib
Bartender:Hey aren't you that rope I threw out an hour ago?
Rope:No, I'm a frayed knot.