Results 1 to 5 of 5

Thread: newbie question

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2000
    Location
    Nashville, TN
    Posts
    54
    Hello everyone i have a simple question (I think)
    anyways i have an access database that has one 3 tables and 1 query. Now i know how to in DAO to open a table using "Set rs1 = db.OpenRecordset(strRSName1, dbOpenTable)"
    as an example but is there any way to open a query? I thought it would be similiar like "Set rs1 = db.OpenRecordset(strRSName1, dbOpenQuery)"

    Does this make sense? Thanks for any help

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use:
    Code:
    Set rst = MyDB.OpenRecordset("SELECT * FROM MyTable", dbOpenSnapshot)
    to open a SQL query.

    To open a set query:
    Code:
    Set rst = MyDB.QueryDefs(0).OpenRecordset
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    using a datacontrol.

    Dim Sql as String
    Sql = "Select * from your table"
    Data1.Recordsource = Sql
    Data1.Refresh
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Structured Query Language is VERY hot!

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Yeah...probably the easiest to use 'Standard Interface' to anything in the Universe...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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