Results 1 to 5 of 5

Thread: Read only qry?

  1. #1
    Join Date
    Oct 2003
    Posts
    233

    Unanswered: Read only qry?

    Can you make a qry readonly?

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Do you want the data rerurned and/or the design to be read only? How will the query be accessed?

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ignoring my view that it is a bad idea to show users query "datasheets"...

    take an editable example query:
    SELECT idPriceList, descrPriceList FROM tblPriceList

    this variation should not be editable but you get a strange row returned.
    SELECT 0 AS idPriceList, " THIS STUFF IS READ ONLY" AS descrPriceList FROM tblPriceList
    UNION
    SELECT idPriceList, descrPriceList FROM tblPriceList


    this variation looks editable but is not.
    SELECT [idPriceList] & " " AS PriceListID, [descPriceList] & " " AS PriceListDescription FROM tblPriceList

    isn't is simpler to use a list instead of datasheet view of a query?

    izy

    PS: "" works as well as " "
    Last edited by izyrider; 03-17-08 at 14:36.
    currently using SS 2008R2

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    In the query properties box (for the Recordset Type line), change it from Dynaset to Snapshot. The query will not only be read-only but it will be faster as well.
    Last edited by pkstormy; 03-17-08 at 15:22.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    gosh PK, blindingly obvious & sweet (...if you really must show query datasheets)

    izy
    currently using SS 2008R2

Posting Permissions

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