Results 1 to 3 of 3

Thread: Working with MS Access tables

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2009
    Posts
    1

    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.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Working with MS Access tables

    Thread moved from 'VB6 and Earlier' forum to 'VB.Net' (VB2002 and later) forum

  3. #3
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    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.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width