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!

Not showing report

Status
Not open for further replies.

yummy7

Technical User
Jun 2, 2006
195
CA
I am getting error "The report name 'rptStore' you entered is mispelled or refer to a report that isnt open or doesnt exist." So please tell me should I make the report through wizard or design view.How should be the report.Why its giving error?
CurrentDb.QueryDefs("Query2").SQL = "SELECT Snumber from Store_t where " & GetCriteria()
Reports!rptStore.Recordset = "Query2"[b/]
DoCmd.OpenReport Reports!rptStore , acViewNormal, , , acDialog
Any suggestion is most appreciated.
 
yummy7
Change the line
DoCmd.OpenReport Reports!rptStore , acViewNormal, , , acDialog

to
DoCmd.OpenReport "rptStore", acViewNormal,,,acDialog

Tom
 
Thanx Tom for your support.
The problem is, Query is flexible.Actually it has no fields defined at start. I modify it with this method.

CurrentDb.QueryDefs("Query2").SQL = "SELECT " & strList & " from Store_t where " & GetCriteria()

Then I want to make it datasource of a report.
What about above criteria.It is not showing that one.
 
Your report must be open in order to modify its properties. You can set the Recordsource in the On Open event of the report.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top