NewTexican
Technical User
I'm pulling data from another database into a form on the current database. I want to see a list of records on this form. I can succesfully get a message box to give me the records one by one, but I want a list. Any help for me? Thanks in advance.
Public Sub plan_companycall()
Dim dbb As DAO.Database
Dim rsss As DAO.Recordset
Dim sqq As String
Dim sqq2 As String
Set dbb = DBEngine.Workspaces(0).OpenDatabase("...path...Plan Module I")
Set rsss = dbb.OpenRecordset("plan-company T", dbOpenDynaset)
sqq = "[company numeric]= " & Me.Company_Numeric
rsss.FindFirst sqq
If rsss.NoMatch Then
sqq2 = "No Company"
Else: Do While Not rsss.NoMatch
sqq2 = rsss![plan alpha] & " " & rsss![plan numeric]
MsgBox sqq2
rsss.FindNext sqq
Loop
End If
Me.List12.RowSource = sqq2
Set dbb = Nothing
rsss.Close
Set rsss = Nothing
End Sub
Public Sub plan_companycall()
Dim dbb As DAO.Database
Dim rsss As DAO.Recordset
Dim sqq As String
Dim sqq2 As String
Set dbb = DBEngine.Workspaces(0).OpenDatabase("...path...Plan Module I")
Set rsss = dbb.OpenRecordset("plan-company T", dbOpenDynaset)
sqq = "[company numeric]= " & Me.Company_Numeric
rsss.FindFirst sqq
If rsss.NoMatch Then
sqq2 = "No Company"
Else: Do While Not rsss.NoMatch
sqq2 = rsss![plan alpha] & " " & rsss![plan numeric]
MsgBox sqq2
rsss.FindNext sqq
Loop
End If
Me.List12.RowSource = sqq2
Set dbb = Nothing
rsss.Close
Set rsss = Nothing
End Sub