Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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.
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page