Access 2000 and SQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gordo

    #1

    Access 2000 and SQL

    Hello,

    I would like to Execute this Select Statement...

    SELECT MAX(VisitorID) FROM Visitors.

    Is there any way to store the result directly into a VB variable??

    lngVisitorID = ???

    Thanks!!!


  • Pieter Linden

    #2
    Re: Access 2000 and SQL

    "Gordo" <gmarr6@yahoo.c om> wrote in message news:<GXLab.186 931$la.3727115@ news1.calgary.s haw.ca>...[color=blue]
    > Hello,
    >
    > I would like to Execute this Select Statement...
    >
    > SELECT MAX(VisitorID) FROM Visitors.
    >
    > Is there any way to store the result directly into a VB variable??
    >
    > lngVisitorID = ???
    >
    > Thanks!!![/color]

    use DMAX, like (who was it?) Arvin Meyer said?

    LastID = DMax("[VisitorID]", "tblVisitor s")

    Comment

    Working...