Hi, this is my first time posting a question so please bear with me. I am a novice at VB2005 and looking for help utilizing a variable to call open a database. This will allow me to chose which access database (with similar tables) I want to open utilizing the same form. I currently do this in VB6. I can open multiple instances of the same or different databases as an mdichild inside a parent form. I have not found out how to do this in 2005. Any help is appreciated. Thanks.
Using a variable to allow opening multiple Access databases
Collapse
X
-
Tags: None
-
Just thought I would provide some more information. The line of code that I am trying to modify is shown below
connectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0;Data Source="C: \books.mdb" ;"
What I would like to do is replace the MS Acess file name (or name and path) with a variable such as "textbox1.t ext" or the "OpenFileDialog .FileName" but I can't get it to read the actual text contained in those string variables. If I am mis-using terms, please forgive me as I have not been formally trained in VB. -
No don't do like thatOriginally posted by VB4DUMMYPOSTERC HILDJust thought I would provide some more information. The line of code that I am trying to modify is shown below
connectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0;Data Source="C: \books.mdb" ;"
What I would like to do is replace the MS Acess file name (or name and path) with a variable such as "textbox1.t ext" or the "OpenFileDialog .FileName" but I can't get it to read the actual text contained in those string variables. If I am mis-using terms, please forgive me as I have not been formally trained in VB.
before opening new form u've to make the main form as mdi parent then make new instance of new form and set its mdiparent=me and then show it
Try it
Good LuckComment
-
Originally posted by vijaydiwakarNo don't do like that
before opening new form u've to make the main form as mdi parent then make new instance of new form and set its mdiparent=me and then show it
Try it
Good Luck
I have already worked out the parent child relationship and I can open up multible instances of the child form referencing the same database. What I need help with is opening one instance with book1.mdb as the data source and another instance with book 2.mdb as the data source. Both would have the same titles such as author, publish date, etc...Comment
Comment