Module problems

J

Jennifer

I have my queries,tables, modules, and macros all set up. Below is the
function my module serves. I changed the name of a table, and it will not
work now- I get a message box stating- "Could not find output table 'Final'."
Which this is the table name that I changed- I changed it to FinalCR, now
the module don't work correctly. When I go into "Debug" the problem, it
highlights the last line of the module below. Can anyone help? What do I need
to do to tweek the module to the table name change?

Public Function DoSQL()
Dim SQL As String
SQL = "UPDATE Code " & _
"SET code.number1 = '1'"
DoCmd.RunSQL SQL
DoCmd.OpenQuery "make final CR tbl", acViewNormal, acEdit

**Also if I change the table name back to just 'Final', it works fine.
Please help
Thanks,
Jennifer
 
D

Dennis

The problem is not in this code. You are running a query called "make final
CR tbl" which is where the table name is defined. Open this query in design
view & then right click in the top half of the query grid and select
properties. The destination table name is where you need to change it to
FinalCR
 
J

Jennifer

Thank You so much Dennis!!! Of course, it worked and it would have been the
last thing I would have checked. That's the problem with Access... there is
so many things you need to have correct for it to work right!

Again, thanks for your help
Jennifer
 

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