Re: CommonDialog beginner's question
- From: "Steve Gerrard" <mynamehere@xxxxxxxxxxx>
- Date: Tue, 6 Mar 2007 20:58:18 -0800
"Floria_Tosca" <toscalives@xxxxxxxxxxx> wrote in message
news:1173208244.471342.174740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Okay, if I were to use a FileListBox instead of a common dialog, which
would list the databases, how would I get it to open the one I click
on, and list the data from the tables in the ListBox? I tried it and
got the same error. I don't even know what References are (I'm a
scientist posing as a programmer), so could someone direct me to any
useful web resources on vb 6?
Well, this newsgroup is considered by some to be a useful web resource on VB6 :)
References are something you set by clicking the Project menu, then
References... You select a file from the list, after which the types defined in
the file are available to your program. In your case, you need a Microsoft Data
Access Objects reference, so you can use DAO objects.
In your original post, you started out with
Set MyDB = OpenDatabase(dbPath)
CommonDialog1.ShowOpen
Set MyDB = CommonDialog1.FileName
The first line opens a database before you run the dialog. The third line
doesn't make sense - its sets your db to a file name.
I think you mean something more like
CommonDialog1.ShowOpen
Set MyDB = OpenDatabase(CommonDialog1.FileName)
which would ask for a filename, then open the chosen file as a database.
Here are some other web resources:
Google. You can search for Visual Basic 6, or click more>>, Groups, and search
archives of all the newsgroups. Very useful for specific problems.
MVPs.org, a list of sites by MVPs, including Randy Birch's VBNet site:
http://www.mvps.org/
http://vbnet.mvps.org/
.
- References:
- CommonDialog beginner's question
- From: Floria_Tosca
- Re: CommonDialog beginner's question
- From: Phill W.
- Re: CommonDialog beginner's question
- From: Floria_Tosca
- CommonDialog beginner's question
- Prev by Date: Re: Non Zero and NZ
- Next by Date: Re: Non Zero and NZ
- Previous by thread: Re: CommonDialog beginner's question
- Next by thread: Re: CommonDialog beginner's question
- Index(es):
Relevant Pages
|
Loading