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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Question on Query table name changing



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2004, 05:05 PM
Thomas
external usenet poster
 
Posts: n/a
Default Question on Query table name changing

I have a query that runs against a table "billing". This table is created
monthly by the user as a new table using the Import function. She rename the
previous months "billing" table to "September 2004 billing". Creates a new
table called "billing" and runs a report. When ever she does this if you
look at the query I created to run against the "billing" table it seems to
think it needs to use the "September 2004 billing" table.
--
Thomas
  #2  
Old September 17th, 2004, 07:48 PM
Mike Labosh
external usenet poster
 
Posts: n/a
Default

This is a "feature" grrr in Access because stupid people used to go
building lots of stuff, and then change the name of a table, and break their
application.

Now, whenever you rename a table, Access updates the queries that refer to
it.

You could write some VBA code that changes the query back, by using the
Replace function on the SQL property of your QueryDef.

--
Peace & happy computing,

Mike Labosh, MCSD

Feed the children!
Save the whales!
Free the mallocs!


  #3  
Old September 17th, 2004, 08:17 PM
Thomas
external usenet poster
 
Posts: n/a
Default

thank you soooooooooooooooooo much - been driving me crazy!!!!!!

"Mike Labosh" wrote:

This is a "feature" grrr in Access because stupid people used to go
building lots of stuff, and then change the name of a table, and break their
application.

Now, whenever you rename a table, Access updates the queries that refer to
it.

You could write some VBA code that changes the query back, by using the
Replace function on the SQL property of your QueryDef.

--
Peace & happy computing,

Mike Labosh, MCSD

Feed the children!
Save the whales!
Free the mallocs!



  #4  
Old September 17th, 2004, 09:55 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Fri, 17 Sep 2004 09:05:06 -0700, Thomas
wrote:

I have a query that runs against a table "billing". This table is created
monthly by the user as a new table using the Import function. She rename the
previous months "billing" table to "September 2004 billing". Creates a new
table called "billing" and runs a report. When ever she does this if you
look at the query I created to run against the "billing" table it seems to
think it needs to use the "September 2004 billing" table.


Two suggestions:

- Simple fix: use Tools... Options... General and uncheck "Track Name
Autocorrect Info".

- MUCH BETTER fix, IMHO: Rather than importing data into separate
tables for each month, have *one single billing table*. Dates *are
data* and should be stored as data, not in a fieldname! Your queries
can and should filter the billing table to extract the data for a
given month.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
  #5  
Old September 17th, 2004, 10:27 PM
Mike Labosh
external usenet poster
 
Posts: n/a
Default

- Simple fix: use Tools... Options... General and uncheck "Track Name
Autocorrect Info".


WOAH! I thought that had to do with intellisense! That bad boy is getting
unchecked NOW!

- MUCH BETTER fix, IMHO: Rather than importing data into separate
tables for each month, have *one single billing table*. Dates *are
data* and should be stored as data, not in a fieldname! Your queries
can and should filter the billing table to extract the data for a
given month.


Yes. Much better solution. Just pass the month DatePart to a WHERE clause.
--
Peace & happy computing,

Mike Labosh, MCSD

Feed the children!
Save the whales!
Free the mallocs!


 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Taher Setting Up & Running Reports 1 August 31st, 2004 09:07 PM
Force Blank Lines jnew Setting Up & Running Reports 8 July 21st, 2004 09:45 PM
Using Start Date and End Date in Query ChuckW Running & Setting Up Queries 5 July 20th, 2004 02:52 AM
Name not showing ID is René Setting Up & Running Reports 11 June 29th, 2004 01:40 AM
Update another table with a Max record query Ngan Running & Setting Up Queries 2 June 22nd, 2004 05:01 PM


All times are GMT +1. The time now is 03:56 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.