A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Module problems



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2008, 01:51 PM posted to microsoft.public.access.queries
Jennifer
external usenet poster
 
Posts: 557
Default Module problems

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
  #2  
Old July 10th, 2008, 02:20 PM posted to microsoft.public.access.queries
Dennis
external usenet poster
 
Posts: 1,222
Default Module problems

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

"Jennifer" wrote:

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

  #3  
Old July 10th, 2008, 02:34 PM posted to microsoft.public.access.queries
Jennifer
external usenet poster
 
Posts: 557
Default Module problems

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

"Dennis" wrote:

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

"Jennifer" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.