473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Determining the file location of the back-end

I know how to determine the file location of the current Access
database in VBA. But I'm trying to figure out how to determine the
file location of my back-end. Anybody know how I can call up the path
& name of the .mdb with my tables in it -- from a module in my front-
end?
Jul 22 '08 #1
5 2889
See if this little piece of code helps:

Public Function ShowTables()
Dim I As Integer
With CurrentDb
For I = 0 To .TableDefs.COUNT - 1
If Len(Trim(.TableDefs(I).Connect)) 0 Then
Debug.Print .TableDefs(I).Connect
Debug.Print .TableDefs(I).SourceTableName
End If
Next
End With
End Function
evenlater wrote:
>I know how to determine the file location of the current Access
database in VBA. But I'm trying to figure out how to determine the
file location of my back-end. Anybody know how I can call up the path
& name of the .mdb with my tables in it -- from a module in my front-
end?
--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200807/1

Jul 22 '08 #2
"evenlater" <ev*******@gmail.comwrote in message
news:84**********************************@k37g2000 hsf.googlegroups.com...
>I know how to determine the file location of the current Access
database in VBA. But I'm trying to figure out how to determine the
file location of my back-end. Anybody know how I can call up the path
& name of the .mdb with my tables in it -- from a module in my front-
end?
CurrentDb.TableDefs("My Linked Table").Connect

will give you the path to the BE file.
Jul 22 '08 #3
That's what I'm looking for! Thanks!
Jul 22 '08 #4
evenlater wrote:
That's what I'm looking for! Thanks!
Couple of additional things to consider:

- most split apps have only one BE file but it is certainly possible to
link to tables in more than one BE file. Uncommon but just something to
be aware of.

- you'll want to ensure that the BE actually exists. No error is raise
when opening a FE with linked tables to a BE that doesn't exist - you'll
want to code for that possibility.

Good luck on the project!

--
'--------------------------
' John Mishefske
' UtterAccess Editor
' Microsoft MVP 2007, 2008
'--------------------------
Jul 23 '08 #5
John Mishefske <mi****@execpc.comwrote:
>- most split apps have only one BE file but it is certainly possible to
link to tables in more than one BE file. Uncommon but just something to
be aware of.
Indeed. I have have code in a few databases that, on startup, double checks that all
tables are linked to the same backend. Just belts and suspenders programming.
>- you'll want to ensure that the BE actually exists. No error is raise
when opening a FE with linked tables to a BE that doesn't exist - you'll
want to code for that possibility.
Another good point. This is as simple is opening a recordset based on a table
preferably with only a few records in it. If the open succeeds that all is well.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Aug 2 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
10
by: Orion | last post by:
Hey, I was wondering if it was possible to determine if you hit 'EOF' using fseek? I'm using fseek to traverse through the file from start to end and capturing the data into a linked list...
14
by: googler | last post by:
Is there any C library function that returns the size of a given file? Otherwise, is there a way in which file size can be determined in a C program? I need to get this for both Linux and Windows...
8
by: nkrisraj | last post by:
Hi, I have a following structure: typedef struct { RateData rdr; int RateID; char RateBalance; } RateInfo;
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
4
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is...
0
by: Mike | last post by:
Hi! I am programmatically converting Excel to PDF using Adobe PDF printer installed with Adobe Acrobat 6 and above. When I initiate Print command for this printer, a window comes up which...
10
by: Peter Olcott | last post by:
Someone told me that determining the exact location and current state of any JavaScript controls is pretty easy. Does anyone know exactly how this is done?
6
by: elake | last post by:
I found this thread about a pst file in Windows being locked and I am having the same issue. ...
10
by: Mark Chambers | last post by:
Hi there, Given two file names in relative or absolute format, I need to determine if they point to the same file. While I can simply pass each to "Path.GetFullPath()" and compare the results,...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.