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

Setting Recordset for Form

Status
Not open for further replies.
Jan 18, 2002
1
US
I wish to set the recordset for a form to one of several named and saved queries. I also wish to do this just prior to opening the target form from a menu. When I attempt to do this with the following code:

[Forms]![frmSchPermit].RecordSource = "qrySchPermit"

I get an error message stating the following:

"[database name] can't find the form 'frmSchPermit' referred to in a Macro or Visual Basic Code"

where [database name] is the name of the current database and 'frmSchPermit' is the name of the form specified in the VB code shown above. Any assistance on why this is not working is appreciated.
 
It's sine qua non that form (frmSchPermit) would be opened.

I didn't find any other mistake in your command string.

Aivars

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top