Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying more than one record from a recordset

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
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
 
How are ya NewTexican . . . . .

How about a [purple]Hidden ListBox[/purple] with [blue]RowSource[/blue] set to a dynamic query? You could [blue]hide/UnHide[/blue] the [blue]ListBox[/blue] with a button . . .

Calvin.gif
See Ya! . . . . . .
 
Well, I wanted the user to be able to see this info and delete and add to this "list." I've been playing around with it and it seems to me that recordsets aren't the way to go. I just learned about "remote" queries and so far they seem to be working well.
 
NewTexican . . . . .

Your last post is talking the [purple]opening of another form[/purple], which is not a bad Idea either. [purple]Add/Delete records is easily done here![/purple] Just [blue]assign the proper query to the RecordSource![/blue] (you cando this on the fly)

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top