Access 2000 question

  • Thread starter Thread starter Ray Milhon
  • Start date Start date
R

Ray Milhon

I have a report that needs a pair of make table queries to run prior to
running the report. I have a form that the user can enter the parameter data
and the queries run fine. The only issue is that the user is prompted twice
for each of the 2 queries that are run prior to the report. Is there a way I
can answer the dialog boxes without them popping up to the user?
 
Use an unbound form with unbound text boxes for the entries. Then refer to
them in the queries.
P.S. The form must be open and enter data in the text boxes.
 
I guess I wasn't very clear. I have an unbound form that runs the report.
However there are 2 steps that must be performed prior to the report actually
displaying or printing the report data. There are 2 make table queries that
are run to make sure the data is in the correct format. the first query
creates a table with 4 fields. The second takes that table and runs a cross
tab Query that puts that data into a table. The actual report is based on a
query that links other data to the crosstab data. The problem is that when
the report is run the user is prompted 4 times to confirm the deletion of the
existing temp table and creating the new temp table. I want to eliminate the
prompting of the user for those functions. I want the reports to
automatically delete and create the new tables without prompting the user
 
I don't like to use Make table queries in production apps. I fear that at
some point it will/might corrupt the FE. Not to mention bloat.

Why couldn't you set the tables up and delete the records before you run an
append query??

So if the first table is named tblRawData and the second tables is named
tblX_Tab then you could have:

Dim DB as DAO>Database

Set DB = CurrentDB
DB.Execute "DELETE * FROM tblRawData", dbFailOnError
DB.Execute "DELETE * FROM tblX_Tab", dbFailOnError
 
Thanks that does what I want it to do. f

Steve Sanford said:
I don't like to use Make table queries in production apps. I fear that at
some point it will/might corrupt the FE. Not to mention bloat.

Why couldn't you set the tables up and delete the records before you run an
append query??

So if the first table is named tblRawData and the second tables is named
tblX_Tab then you could have:

Dim DB as DAO>Database

Set DB = CurrentDB
DB.Execute "DELETE * FROM tblRawData", dbFailOnError
DB.Execute "DELETE * FROM tblX_Tab", dbFailOnError
.
.
'more code

No dialog boxes, the PKs and indexes are set, no fuss.

FWIW, ...my 2 pennies...

HTH
 

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

Back
Top