lock record on a form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Themis Parintas ste kardias

    #1

    lock record on a form

    How can i make a form which is lock and display only the 3th record of a
    table


  • Trevor Best

    #2
    Re: lock record on a form

    Themis Parintas ste kardias wrote:[color=blue]
    > How can i make a form which is lock and display only the 3th record of a
    > table
    >
    >[/color]

    Strange request but first you need to define what is the 3rd record, if
    your table has an autonumber column you can use that but be aware it
    might not always be the one with the value 3 in it as autonumbers can be
    skipped by aborted inserts and deletions. It is a good bet that you can
    order by the autonumber column and the the 3rd one down is the 3rd row
    that you want.

    Assuming the autonumber column is called MyID...

    select top 1 * from MyTable where MyID not in (select top 2 MyID from
    MyTable order by MyID) order by MyID;

    Now the 3rd record is the only one in the recordset.

    --
    Error reading sig - A)bort R)etry I)nfluence with large hammer

    Comment

    Working...