troubleshooting Question

Database Form Wizard - need variable path and db name

Avatar of jeffg_91911
jeffg_91911 asked on
Visual Basic Classic
8 Comments1 Solution162 ViewsLast Modified:
I created a database form using the database form wizard.  The path and database is hard coded.
I need to use a variable.  I have a global variable gDBPath that contains the path and database name.
How do I modify the form to use the "gDBPath" global variable. Please help with exact syntax.

In the code for the form.

      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\x\y\z\Blank.mdb;"
      OLEDBString     =   "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\x\y\z\Blank.mdb;"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""


In the database form.
ADODC Properties...Use Connection String

PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\x\y\z\Blank.mdb;


Thanks in advance for the help.
ASKER CERTIFIED SOLUTION
xSinbad

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros