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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
- 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 | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |