PC Review


Reply
Thread Tools Rate Thread

Determine File Location

 
 
alex
Guest
Posts: n/a
 
      13th Jan 2010
Hi,

Is it possible (in VBA) to check and see where an Access file is being
opened/accessed from?

For example:
If mdb/mde file attempting to be opened resides in C:\db then
'do something
else
'do something else
end if

Thanks,
alex
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      13th Jan 2010
"alex" <(E-Mail Removed)> wrote in message
news:4f320ceb-c85f-41f7-b852-(E-Mail Removed)...
> Hi,
>
> Is it possible (in VBA) to check and see where an Access file is being
> opened/accessed from?
>
> For example:
> If mdb/mde file attempting to be opened resides in C:\db then
> 'do something
> else
> 'do something else
> end if
>
> Thanks,
> alex



CurrentProject.Path returns the folder path where the current database
resides.

CurrentProject.Name returns the name of the current database file.

CurrentProject.FullName returns the folder path and name of the current
database file.

CurrentDb.Name also returns the folder path and name of the current database
file, but doesn't work in an ADP (Access Data Project).

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 
Reply With Quote
 
alex
Guest
Posts: n/a
 
      13th Jan 2010
On Jan 13, 8:59*am, "Dirk Goldgar"
<d...@NOdataSPAMgnostics.com.invalid> wrote:
> "alex" <sql_...@yahoo.com> wrote in message
>
> news:4f320ceb-c85f-41f7-b852-(E-Mail Removed)...
>
> > Hi,

>
> > Is it possible (in VBA) to check and see where an Access file is being
> > opened/accessed from?

>
> > For example:
> > If mdb/mde file attempting to be opened resides in C:\db then
> > 'do something
> > else
> > 'do something else
> > end if

>
> > Thanks,
> > alex

>
> CurrentProject.Path returns the folder path where the current database
> resides.
>
> CurrentProject.Name returns the name of the current database file.
>
> CurrentProject.FullName returns the folder path and name of the current
> database file.
>
> CurrentDb.Name also returns the folder path and name of the current database
> file, but doesn't work in an ADP (Access Data Project).
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips:www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)


Worked perfectly Dirk; many thanks!
alex
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine cursor location? Dan Microsoft Excel Misc 4 12th Mar 2009 03:11 PM
How to determine MailItem Location Felix Angulo Microsoft Outlook VBA Programming 1 15th May 2008 09:12 PM
Determine location in XML Jeff Microsoft C# .NET 1 31st May 2004 10:18 PM
Determine location of printer Stephen Muecke Microsoft VB .NET 0 30th Apr 2004 03:43 AM
Determine client's location?? Laszlo Csabi Microsoft ASP .NET 5 23rd Nov 2003 08:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:47 PM.