Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: Show Results of an ado Rs in a datasheet view

    I would like to see in datasheet view the results of my RecordSet. I would like it in a seperate window how can i do this?


    M~

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    Your recordset is based on a table or a query, so just show the query instead. If you need to, you can open the base query and alter the sql on the fly before you open it in datasheet view:

    set qdf = dbs.querydefs("YourQueryName")
    If Instr(qdf.sql, " In ") > 0 then
    qdf.sql = left(qdf.sql,instr(qdf.sql, " In ") -1) & " In (" & strTemp & ");"
    else
    qdf.sql = left(qdf.sql,len(qdf.sql)-3) & " In (" & strTemp & ");"
    end if
    qdf.close

  3. #3
    Join Date
    Oct 2003
    Posts
    311
    Originally posted by jmrSudbury
    Your recordset is based on a table or a query, so just show the query instead. If you need to, you can open the base query and alter the sql on the fly before you open it in datasheet view:

    set qdf = dbs.querydefs("YourQueryName")
    If Instr(qdf.sql, " In ") > 0 then
    qdf.sql = left(qdf.sql,instr(qdf.sql, " In ") -1) & " In (" & strTemp & ");"
    else
    qdf.sql = left(qdf.sql,len(qdf.sql)-3) & " In (" & strTemp & ");"
    end if
    qdf.close
    my rs isnt based on a tabl or qry, it is sql and gets strung togather from ckboxes, radio boxes and cbo boxes at runtime. any more help if possible pls

    ~M

  4. #4
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    Sql is a query. Just replace the entire qdf.sql with your sql statement then.

Posting Permissions

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