Neil- See code I posted that uses CurrentDb.Name but extracts just the Path from it. The Name property includes the full path *and* the database file name. John Viescas, author Building Microsoft Access Applications Microsoft Office Access 2003 Inside Out Running Microsoft Access 2000 SQL Queries for Mere Mortals http://www.viescas.com/ (Paris, France) For the inside scoop on Access 2007, see: http://blogs.msdn.com/access/
_____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Squires, Neil Sent: Monday, June 19, 2006 4:18 PM To: [email protected] Subject: RE: [ms_access] CurDir help please Guy's, I think this may be the code you are looking for. Dim FullPath As String FullPath = Me.Application.CurrentDb.Name Neil -----Original Message----- From: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com [mailto:[EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com]On Behalf Of John Viescas Sent: Sunday, June 18, 2006 10:58 PM To: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com Subject: RE: [ms_access] CurDir help please Brett- Shouldn't work. If I go to A97 Immediate Window and type: ?Application.CurrentProject.Path .. I get "Method or Data Member not found." How did you make the "A97" copy, and how did you compile it? John Viescas, author Building Microsoft Access Applications Microsoft Office Access 2003 Inside Out Running Microsoft Access 2000 SQL Queries for Mere Mortals http://www.viescas. <http://www.viescas. <http://www.viescas.com/> com/> com/ (Paris, France) For the inside scoop on Access 2007, see: http://blogs. <http://blogs. <http://blogs.msdn.com/access/> msdn.com/access/> msdn.com/access/ _____ From: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com [mailto: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com] On Behalf Of Brett Collings Sent: Sunday, June 18, 2006 11:06 PM To: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com Subject: Re: [ms_access] CurDir help please Now that's interesting! One of my clients has 10 machines on XP and one on A97. The reference to all my form and report graphics is Application.CurrentProject.Path & "/graphics/" I've made an A97 copy for them and it seems to work. I wonder if I just got lucky? Brett John Viescas wrote: > Brett- > > The CurrentProject property doesn't exist in Access 97. > > John Viescas, author > Building Microsoft Access Applications > Microsoft Office Access 2003 Inside Out > Running Microsoft Access 2000 > SQL Queries for Mere Mortals > http://www.viescas. < http://www.viescas. <http://www.viescas. <http://www.viescas.com/> com/> com/> com/ < http://www.viescas. < http://www.viescas. <http://www.viescas. <http://www.viescas.com/> com/> com/> com/> > (Paris, France) > For the inside scoop on Access 2007, see: > http://blogs. < http://blogs. <http://blogs. <http://blogs.msdn.com/access/> msdn.com/access/> msdn.com/access/> msdn.com/access/ < http://blogs. < http://blogs. <http://blogs. <http://blogs.msdn.com/access/> msdn.com/access/> msdn.com/access/> msdn.com/access/> > > _____ > > From: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com <mailto:ms_access%40yahoogroups.com> > [mailto:[EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com > <mailto:ms_access%40yahoogroups.com>] On Behalf > Of Brett Collings > Sent: Sunday, June 18, 2006 10:12 PM > To: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> ps.com <mailto:ms_access%40yahoogroups.com> > Subject: Re: [ms_access] CurDir help please > > I don't have the reference here so this is aircode > Application.CurrentProject.Path > is I think the object that returns the path of the currently open > database. > > Brett > > Ilona Wright wrote: > > > Hi John, > > I am using the CurDir function to return the current path. > > I am expecting the path of the .mdb using the function, but it > returns the > > ACCESS Default Database Folder. > > Can you please tell me how to determine the current path? > > > > I am using Acces 97. What I am trying to do is establish links to > > tables on > > opening my switchboard form. The data tables are in a separate > databse to > > the application software, but I expect the tables database to reside > > in the > > same folder as the application software database. So, if the switchboard > > knows where it is, it can establish the links to the data tables. I > > want the > > linking to be hidden from the user. > > I hope this makes sense. > > Thank you again in advance > > Ilona > > > > [Non-text portions of this message have been removed] > > > > > > -- > Brett Collings > Strengthening Families Administrator > D2D 46422 > DDI (04) 916 3422 > > ------------------------------- > This email message and any attachment(s) is intended only for the > person(s) or entity(entities) to whom it is addressed. The > information it contains may be classified as IN CONFIDENCE and may be > legally privileged. If you are not the intended recipient any use, > disclosure or copying of the message or attachment(s) is strictly > prohibited. If you have received this message in error please > notify us immediately and destroy it and any attachment(s). > Thank you. The Ministry of Social Development accepts no > responsibility for changes made to this message or to any > attachment(s) after transmission from the Ministry. > ------------------------------- > > [Non-text portions of this message have been removed] > > [Non-text portions of this message have been removed] > > -- Brett Collings Strengthening Families Administrator D2D 46422 DDI (04) 916 3422 ------------------------------- This email message and any attachment(s) is intended only for the person(s) or entity(entities) to whom it is addressed. The information it contains may be classified as IN CONFIDENCE and may be legally privileged. If you are not the intended recipient any use, disclosure or copying of the message or attachment(s) is strictly prohibited. If you have received this message in error please notify us immediately and destroy it and any attachment(s). Thank you. The Ministry of Social Development accepts no responsibility for changes made to this message or to any attachment(s) after transmission from the Ministry. ------------------------------- [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/q7folB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
