How to connect to 2 mdb files with one Data control at run time?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Dear All,
vb6.
Data1.DatabaseName = "C:\Database2008.mdb" when the Form1 is loaded. I want
to change the name of Data1.DatabaseName to "C:\Database2009.mdb" when I
click on Command1 at run time. I tried to rename the Data control:
Data1.DatabaseName = "C:\Database2009.mdb"
but it does not read from the Database2009.mdb as the results are still read
from the Database2008.mdb. The Data1.RecordSource is the same name at all
time.
Any idea what else I need to do to instruct the data control to connect to
the other mdb file? Or, should I add a new Data control to the Form1 for the
Database2009?
Thanks for your comments in advance.
DORI
.



Relevant Pages

  • Re: How to connect to 2 mdb files with one Data control at run tim
    ... vb6. ... click on Command1 at run time. ... I tried to rename the Data control: ... Any idea what else I need to do to instruct the data control to connect to ...
    (microsoft.public.vb.general.discussion)
  • Re: How to connect to 2 mdb files with one Data control at run time?
    ... vb6. ... click on Command1 at run time. ... I tried to rename the Data control: ... Any idea what else I need to do to instruct the data control to connect to ...
    (microsoft.public.vb.general.discussion)
  • Re: DAO (Instantiate as Object or use the Data Control)
    ... Control on your VB6 Form, or instantiate it as an object. ... I have never seen anyone instantiate a Data Control in an Access ... VB6 still has the DAO library, so I don't see any need to use ADO if you are ...
    (comp.databases.ms-access)
  • Re: Custom Data Control
    ... > The problem is that when I use my custom data control in VB5, textboxes, ... You're going to have to write a VB5 version of it. ... VB5 uses DAO for data-binding while VB6 uses ADO. ... you really going to force VB5 developers to also include the VB6 runtime in ...
    (microsoft.public.vb.controls)
  • data control in vb6 doesnt connect to access 2000 db
    ... When I place a data control on a form in VB6 and try to connect to an Access ... I get the message "unrecognised database ... format" while selecting the recordsource in the properties window. ...
    (microsoft.public.access.gettingstarted)