Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2004
    Posts
    11

    Unanswered: protect all records unless newest 8 records

    Can I make the form protect all records unless newest 8 records

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: protect all records unless newest 8 records

    Originally posted by samm
    Can I make the form protect all records unless newest 8 records
    I don't understand what you're trying to do ... As an answer Yes you can ... But depending on how you query, you can end up "protecting" different sequences of 8 records ...

  3. #3
    Join Date
    Jan 2004
    Posts
    16
    Me.RecordSource = "select Top 8 * From tbl1 Order By fld1 DESC"

    where tbl1 is the table and fld1 is the autonumber field
    put this code in event of your form in open.

    sorry for my bad english.

  4. #4
    Join Date
    Mar 2004
    Posts
    11
    Hi M Owen

    I like the user Enter Data and dont change the data more than newest of 8 record

    I use Query with this criteria:
    Between [Forms]![Fmain1]![from] And [Forms]![Fmain1]![to]

    Hi biskra

    I use even on open but still not protect :

    Me.RecordSource = "select Top 8 * From Tmsl Order By ID DESC"
    Last edited by samm; 04-06-04 at 08:06.

  5. #5
    Join Date
    Feb 2004
    Posts
    199
    conditional formatting may help
    bind your form to Query


    SELECT *, Q1.ID Q1_ID FROM Tmsl LEFT JOIN Q1 ON Tmsl.ID=Q1.ID

    WHERE Q1's SQL is

    select Top 8 * From Tmsl Order By ID DESC

    Then set conditional format for your Form's Fields

    ISNULL(Q1_ID) => set ENABLE to false

    last 8 records will be enabled
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  6. #6
    Join Date
    Feb 2004
    Posts
    199
    samm,
    Me.RecordSource = "select Top 8 * From Tmsl Order By ID DESC"
    doesn't mean any protecting, it means to show only last 8 records
    and you shouldn't forget to refresh your form , after a new row is added
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  7. #7
    Join Date
    Mar 2004
    Posts
    11
    thanks kakha

    do you mean to make query with this criteria:

    SELECT *, Q1.ID Q1_ID FROM Tmsl LEFT JOIN Q1 ON Tmsl.ID=Q1.ID
    WHERE Q1's SQL is
    select Top 8 * From Tmsl Order By ID DESC

Posting Permissions

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