Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

referencing tables etc-

Discussion in 'Information Technology' started by aheath15, Jul 28, 2006.

  1. aheath15

    aheath15
    Expand Collapse
    Guest

    How do you reference tables (and even further-specific records in a given
    table) when using macros and Visual Basic? I always see the example
    form!formname! control name, or something similar, but when I try to
    replicate that with a table's information I always get an error.
     
  2. Loading...

    Similar Threads Forum Date
    India 11 Constables Get Pregnant at Training School Breaking News Apr 26, 2011
    Warm Up with Winter Vegetables (Vegetarian Casseroles) Cooking & Recipies Feb 7, 2011
    India Two constables arrested for beating, extortion Breaking News Jul 27, 2010
    History Cleaning Out the Augean Stables Punjab, Punjabi, Punjabiyat Aug 25, 2009
    Sikh News Cold weather damages sugarcane, vegetables in Punjab (New Kerala) Breaking News Feb 1, 2008

  3. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "aheath15" <aheath15@discussions.microsoft.com> wrote in message
    news:FEFFC3F5-DB0E-47B4-A347-994FB2DD5CA7@microsoft.com
    > How do you reference tables (and even further-specific records in a
    > given table) when using macros and Visual Basic? I always see the
    > example form!formname! control name, or something similar, but when I
    > try to replicate that with a table's information I always get an
    > error.


    "Reference" in the sense of getting data out of the table? You have to
    actually query the table, either by opening your own recordset on the
    table or query, or -- simpler for quick lookups -- by using one of the
    domain aggregate functions such as DLookup, DSum, etc. Those function
    open the recordset behind the scenes, so you don't have to be concerned
    with it.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  4. Sprinks

    Sprinks
    Expand Collapse
    Guest

    aheath15,

    See Visual Basic Help (<Alt>-F11, Help) on the DLookup() function.

    Sprinks

    "aheath15" wrote:

    > How do you reference tables (and even further-specific records in a given
    > table) when using macros and Visual Basic? I always see the example
    > form!formname! control name, or something similar, but when I try to
    > replicate that with a table's information I always get an error.
    >
    >
     

Share This Page