Syntax/Command to open a saved query as text in form code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This seems pretty basic but I can't find an example of how to do it.

I have 2 saved queries: sqlBuyerIn & sqlBuyerOut

The record source for my form is sqlBuyerIn.
I want to press a button named "grpInOrOut" and change the recordsource to
sqlBuyerOut...

I think I could do that by using the Me!Recordsource command, but I want to
use an existing saved query, instead of creating the sqlstring.

Thanks for any input.
MikeZz


Private Sub grpInOrOut_Click()

Me!RecordSource = 'NEED HELP HERE!!!!
End Sub
 
Me!RecordSource = "sqlBuyerOut"

The RecordSource property can be a SQL statement, or it can be the name of a
saved query, or the name of a table.
 
I really love to hate programing when it's that easy and I didn't figure it
out on my own.

Thanks, it works like a charm!
 
Back
Top