Working with MS Access tables
Please forgive the brand spanking newbie question (we were all newbies once... thanks to all those that helped us out).
I have an application that I have in VB Express Edition 2008. I have an MS Access database (Access 2003) that I have created a data reference to one of its tables. The table contains 3 fields ID (Counter), Name and Price (text and double). When my form loads I simply want to read each record in the table and create a variable with the same name as the product name and assign it a value the same as the price in the table. So, record 1 in my table has Prod1 in the name field and 2.59 in the price field. I would like these variables to be created when the form loads and be available until the user exits the form.
It seems simple but I cannot find reference to a similar situation anywhere I have looked.
In the Form_Load routine the following line was generated via the designer:
Me.PricerTableAdapter.Fill(Me.PTODataSet.Pricer)
Please assist if possible.
Re: Working with MS Access tables
Thread moved from 'VB6 and Earlier' forum to 'VB.Net' (VB2002 and later) forum
Re: Working with MS Access tables
The line you posted will get the data from the database and have it available to you for use on the form. If you look at the FAQ section of the database area you will find examples of doing this there.