Hi Everybody!
I really hope you guys can help me out with this seemingly paltry dilemma I've encountered. I'm using ADOX to create a new Access Database - this works just fine. I use the Common Dialog box (show open) to allow the user to select a location (drive + folder), and type in a name for the new file to be created. When the user clicks OK - the file gets created (using my "CreateNewDatabase" function), and my application links to that file. This works just fine.
HOWEVER - When a pre-existing .mdb file is selected in the Common Dialog box - I'm screwed, because my function "CreateNewDatabase(FileName as String)" gets called after exiting the Common Dialog box, causing problems (Database Already Exists).
Now, is there a way I can check to see if the file (whether typed or selected in the Common Dialog box) already exists - so that I can provide the user with the option to either a) Overwrite the exiting file b) Simply link to that File or c) Cancel outa there?
I hope this makes sense! If not, please let me know so I can further clarify the details of this tragic affair.
Thanks!
LeGo PiEcE
"The Computer Spock! Destroy it!" - Captain James T. Kirk
I really hope you guys can help me out with this seemingly paltry dilemma I've encountered. I'm using ADOX to create a new Access Database - this works just fine. I use the Common Dialog box (show open) to allow the user to select a location (drive + folder), and type in a name for the new file to be created. When the user clicks OK - the file gets created (using my "CreateNewDatabase" function), and my application links to that file. This works just fine.
HOWEVER - When a pre-existing .mdb file is selected in the Common Dialog box - I'm screwed, because my function "CreateNewDatabase(FileName as String)" gets called after exiting the Common Dialog box, causing problems (Database Already Exists).
Now, is there a way I can check to see if the file (whether typed or selected in the Common Dialog box) already exists - so that I can provide the user with the option to either a) Overwrite the exiting file b) Simply link to that File or c) Cancel outa there?
I hope this makes sense! If not, please let me know so I can further clarify the details of this tragic affair.
Thanks!
LeGo PiEcE
"The Computer Spock! Destroy it!" - Captain James T. Kirk