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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying Recordsource results

Status
Not open for further replies.
Jul 17, 2002
22
US
I have a form that gets user information, when done they click on the "search" button which is to launch another form and on that form display the results of a query.

this is the code on the new form launched:
Me.RecordSource = &quot;SELECT Reservation.Room, Rooms.Capacity FROM Reservation LEFT JOIN Rooms ON Reservation.Room = Rooms.Rooms GROUP BY Reservation.Room, Reservation.Date, Reservation.Start_Time, Rooms.Capacity HAVING (((Reservation.Date)=#&quot; & Forms!Roombydate_time!Text2 & &quot;#) AND ((Reservation.Start_Time)<>#&quot; & Forms!Roombydate_time!Text4 & &quot;#))&quot;
MsgBox RecordSource

the msgbox does show me the Selest statement with the values from the user. But I don't know how to display the results on the form.

any suggestions?

thanks,
soontobefour





 
Hi,

Actualy, you don't need to &quot;play&quot; with the RecordSource in the code. What you can do is on the result form (once the user press SEARCH), you put the SQL statement in the SOURCE of your form. (You will have to leave the first form open)

once this is done, just add all the controls you need (textbox...)

Hope it can help!


Mal'chik [bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top