I have an access database that is split into a front end and a back end database. I have around 50 make table queries that make a table in the back end database.
Currently I have the Another Database radio button checked
Under filename I have referenced a Path and the back end database name.
A user may request the back end database to be placed on a shared server so multiple people can access it. So I have to go into each make table query and manually change the path. This can be cumbersome as I have multiple locations using this.
Looking for a way to change the path once and it changes all the path references in the 50 make table queries. I tried creating a table with the path and then I used a dlookup function in the field. The front end database closed when I did that.
8 1390 zmbd 5,501
Recognized Expert Moderator Expert
... I have around 50 make table queries that make a table in the back end database...
OH MY
WHY?!?!
This will lead to bloat like few other things do and suggests that you may need to really look at the table structure for normalization Bytes > Sitemap > Microsoft Access / VBA Insights>Database Normalization and Table Structures
As for you database closing:
Did you have open, linked tables, or any object bound to them open, to the backend at the time? Changing the path to the link while they are open will usually toss an error; however, there can be strange effects and a frontend crashing is one of the possibilities. Before you can make the change all tables, queries, and forms bound to the linked tables must be closed.
Normally I would suggest using VBA to create a dynamic set of SQL that pulls the path from your backend and then uses the db.execute method. This is what I use when I archive data out of a production database into a subset backend.
Would you mind posting a copy if the SQL you are using?
Of course, you'll want to use generic paths and please make sure that you used the [CODE/] formatting tool
One point of clarification. Each make table queries make a different table in the back end database. 50 make table queries /50 different tables. - SELECT
-
SAPMaterialDL1.Plant,
-
Replace(LTrim(Replace([SAPMaterialDL1].[Material Number], "0", " ")), " ", "0") AS [Material Number],
-
SAPMaterialDL1.[Material Description],
-
SAPMaterialDL1.[Material Type],
-
SAPMaterialDL1.[Base Unit of Measure],
-
SAPMaterialDL1.[MRP Group],
-
SAPMaterialDL1.[Plant Status],
-
SAPMaterialDL1.[MRP Type],
-
SAPMaterialDL1.[Planning Time Fence],
-
SAPMaterialDL1.[MRP Controller],
-
SAPMaterialDL1.[Lot Size Key],
-
SAPMaterialDL1.[Min Lot Size],
-
SAPMaterialDL1.[Max Lot Size],
-
SAPMaterialDL1.[Assembly Scrap],
-
SAPMaterialDL1.[Rounding Value],
-
SAPMaterialDL1.[Procurement Type],
-
SAPMaterialDL1.[SP Key],
-
SAPMaterialDL1.[Planning Calendar],
-
SAPMaterialDL1.[SM Key],
-
SAPMaterialDL1.[Safety Stock],
-
SAPMaterialDL1.[Min Safety Stock],
-
SAPMaterialDL1.[Safety Time],
-
SAPMaterialDL1.[Safety Time / Coverage],
-
SAPMaterialDL1.[Profile for Safety Time],
-
SAPMaterialDL1.[REM Allowed],
-
SAPMaterialDL1.[REM Profile],
-
SAPMaterialDL1.[Plant Deletion Indicator],
-
SAPMaterialDL1.[Quality Inspect],
-
SAPMaterialDL1.[Storage Bin],
-
SAPMaterialDL1.[Old Material Number],
-
SAPMaterialDL1.Field31 INTO SAPMaterialDL IN 'C:\Folder\CSSTRbe.accdb'
-
FROM
-
SAPMaterialDL1;
zmbd 5,501
Recognized Expert Moderator Expert
Yes, we're aware of what the maketable action query does...
You have 50 of these - so 50 tables once ran.
How are you running the queries?
twinnyfo 3,653
Recognized Expert Moderator Specialist
Why not keep the DB BE on the Server, using the unchanging Network address (e.g., \\ServerName\Directory\Folder\Database\). Thus, the path would never change. This is a principle used in this Article which describes User Permissions in MS Access. Although that DB may be much to chew on, the principle is the same.
I am running the queries through a macro.
Hi twinnyfo,
Each site has their own server so the network address changes.
Rabbit 12,516
Recognized Expert Moderator MVP
What is the purpose of all this? I suspect you don't actually have to do all of this and there's a much simpler solution in which you just copy and paste a file.
But we can't guide you to a more efficient solution until we know why you need to "make 50 tables" for each site and why each site is constantly changing the location of their back end.
zmbd 5,501
Recognized Expert Moderator Expert 2nd Rabbit - exactly what I was saying in Post-#2
> You're going to have to look at moving to VBA from the Macro language. Macros are not going to be able to handle building the strings very well and are very difficult to trouble shoot.
I'll have to see if the [Tempvars] collection could be used for the pathname in the action query. Most likely you'll have to directly place it within the SQL view if it's possible.
> Looking at SAPMaterialDL1.[Safety Time / Coverage]
Reccomend removing that slash - it will cause you issues at some point in time - especially with macros!!!!
IMHO, one should only use alphanumerics and the underscore for field names, table names, file names, and other items along these same lines. Error message when you use special characters in Access databases Applies to: Microsoft Office Access 2007Microsoft Office Access 2003
I highly advise replacing the spaces with the underscore in all of your table designs. SAPMaterialDL1.[Safety_Time_Coverage],
or SAPMaterialDL1.[SafetyTimeCoverage],
this will make writing your SQL much simpler.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: valexena |
last post by:
How can I improve performance of queries on tables containing all words
in the dictionary starting with the letter ‘S’?
--
Posted via http://dbforums.com
|
by: Daniel |
last post by:
if System.IO.StreamWriter write throws an exception, is there anyway to
close the System.IO.StreamWriter object? it seems to stay open when this
happens then future attempts to write to that same...
|
by: Stephen |
last post by:
It is possible to relate queries to tables, right? It seems logical
but when I try to match my queries to any of the tables or even to
each other it gives me a blank relationship. What could I...
|
by: Nolan |
last post by:
I have an XML document from another database that I can successfully
import into Access. There are multiple tables and they all parse
correctly into those tables in Access. I can manipulate the...
|
by: Jason Shohet |
last post by:
We have an app that queries 5 tables into a dataset. Now, lets say 1 of
those tables is about to change due to user input on a webpage. Right now,
we are manually updating the db with an update...
| |
by: Janelle.Dunlap |
last post by:
My database is linked to external data from a single Excel spreadsheet.
I currently have it so that the entire spreadsheet exports into one
table, but really for the purpose of my database it will...
|
by: Buglish |
last post by:
Hi,
Task :
-Capture a HTML table with use of regular expression from a text string buffer(entire document).
–Pass it to another function to create a multi dimension array out of it.
- Pass it...
|
by: Jeff McNeil |
last post by:
Your args are fine, that's just the way os.path.walk works. If you
just need the absolute pathname of a directory when given a relative
path, you can always use os.path.abspath, too.
A couple...
|
by: Stewart Ross |
last post by:
The attached database zip file is an Access 2003-format exemplar which contains a custom form that provides a one-stop front-end for the creation, listing and manipulation of queries and tables. The...
|
by: bush3102 |
last post by:
I have a table in MS Access that has +17K of records. I am trying to break down that table into smaller tables of 500 records each. Using the following code, I am able to create the temp table, but...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |