The record source does not exist

J

Joanne

I have the following code that I am running from a form which has opened a
report:
Public Sub btnSearch_Click()
Dim SQL As String
SQL = "SELECT Citation," _
& "CaseName," _
& "[Parties-Appellant]from tblPatentCaseInformation " _
& "WHERE ((([Parties-Appellant])='test'))" _
& "GROUP BY CaseName"

DoCmd.Echo False
DoCmd.OpenReport "CaseInformation", acViewDesign
Reports("CaseInformation").RecordSource = SQL
DoCmd.Close , , acSaveYes
DoCmd.OpenReport "CaseInformation", acViewPreview
DoCmd.Echo True

What can I do? The table exists, the fields exist. I can't find anything
in this database that relates to this issue. Please, can you help me????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top