Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 30th, 2007, 06:15 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default data source...

How make time tracker.mdb dynamic. Just like we do in ASP / VB (e.g. server.mappath('dbName')?

objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\Time Tracker.mdb;Persist Security Info=False"

Rupen Anjaria.:)
------------------
It is not difficult to be on TOP...It is difficult when you carry Truth,Commitment and Transparency with you.
 
Old July 30th, 2007, 10:01 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

How else do you make a string dynamic?

Replace the value with a variable and set the variable at run time.

<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
 
Old July 30th, 2007, 11:19 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

Okay,,even if i set it through variable, how that will catch .mdb file in current folder? (By default it searches in "My Document" folder..

Rupen Anjaria.:)
------------------
It is not difficult to be on TOP...It is difficult when you carry Truth,Commitment and Transparency with you.
 
Old July 30th, 2007, 11:33 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Use the CurrentProject.Path property to return the path of the currently open Access Project (presumably your
Front-End as it seems you are using FE/BE architecture.

<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
 
Old August 1st, 2007, 05:28 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

Thanks Rob, it is solve now..

Rupen Anjaria.:)
------------------
It is not difficult to be on TOP...It is difficult when you carry Truth,Commitment and Transparency with you.
 
Old August 1st, 2007, 06:10 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Rupen,

Glad to hear it, HTH.

Rob

<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Source teddyk ASP.NET 2.0 Basics 1 July 23rd, 2008 08:55 AM
data source hastikeyvan ASP.NET 1.0 and 1.1 Basics 4 April 4th, 2008 11:13 PM
Re: Browsing to Data Source dazzer General .NET 0 March 17th, 2004 08:59 AM
Excel as Data Source bmains ADO.NET 2 February 5th, 2004 04:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.