-
This is lengthy, but I really need help on this one.
I am writing a VB program to access a Microsoft Access Database. I would like to be able to open up different files and have this information show up on my forms in VB.
I have made up an Access database with nine tables in it.
The database is made up to store values for factors that affect peoples concern for the environment. My idea is to store information for different years (ex. 1997, 2000) in different files.
I have made up forms in Visual Basic for each of these tables to show the information stored in the fields.
My start up form has a DriveListBox, DirectoryListBox, a FileListBox and a control to open a file.
What I would like to do is when a file is selected, have Visual Basic connect to the Access database and go to another form in which the user will select which table they want to view information from.
The next form will then come up on the screen with the information from that particular table of the database displayed in the textboxes.
Hopefully this makes sence without actually seeing how I have everything set up. Is it possible to do this, if so, how? Any help is appreciated.
Miasri
-
Can anybody at least give me a direction to go in?
-
<?>
Code:
Is this what your are after and if so, please clarify #1
What file can a user select?
1. I don't offhand see the connection with the user
selecting a file and you opening a database as from
what you have posted there is only one MDB.
2> User selects file and goes to new form with a table listing of choices
3> User selects choice and goes to yet another form with
textboxes on it to display the fields form the table
previously selected.
-
Re: <?>
That is basically it, but I want information from the database to show up in the textboxes of the last form.
It is hard to explain, hopefully I can do a decent job. The database file is called concern.mdb. What I had planned on doing is having more than one directory representing different years. The database is the same for each year in terms of the fields, but the information stored in each folder is different. For example, I have a table called Education. In this table there are three fields: Education_Key, Years, and Number (For the number of people in this category), which will vary from year to year.
Basically, the paths would be: c:\concern\1997\concern.mdb;
c:\concern\1998\concern.mdb etc.
I want to be able to chose different directories from the dirlistbox and then have the rest of the program carry out.
In short, there is more than one database, but the file name is the same in each database. Does this make any sence?