Re: Form won't show last record

Discussion in 'Microsoft Access' started by John Vinson, Sep 5, 2003.

  1. John Vinson

    John Vinson Guest

    On Fri, 5 Sep 2003 08:26:14 -0700, "Michael Bentfeld"
    <> wrote:

    >However, when
    >someone opens the form and clicks on the "last record"
    >button, the last number that shows up is "P997", when
    >there highest number is actually "P1005".


    The text string "P997" is alphabetically larger than the text string
    "P1005". It is NOT A NUMBER, it's a text string; "P1005" will sort
    somewhere between "P100" and "P101".

    A couple of possibilities:

    - Run an Update query updating RETURN# to add the 0:

    UPDATE tablename
    SET [RETURN#] = "P0" & Right([RETURN#], 3)
    WHERE Len([RETURN#]) = 4;

    - Base your Form on a query sorting by Return# (tables have no order,
    if you base the form on the table directly you'll have no control over
    which record is first or last)

    - Remove the P with an update query and convert the field to Number,
    Long Integer; format it for display purposes with a Format like

    "P0000"


    John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
    http://go.compuserve.com/msdevapps?loc=us&access=public
     
    John Vinson, Sep 5, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan Davis

    Last record data to current record.

    Bryan Davis, Aug 13, 2003, in forum: Microsoft Access
    Replies:
    1
    Views:
    192
    Van T. Dinh
    Aug 14, 2003
  2. HSalim

    Re: Form won't show last record

    HSalim, Sep 6, 2003, in forum: Microsoft Access
    Replies:
    1
    Views:
    200
    Larry Daugherty
    Sep 7, 2003
  3. Replies:
    23
    Views:
    406
  4. Guest
    Replies:
    8
    Views:
    747
    liushuai
    Mar 15, 2007
  5. Guest
    Replies:
    1
    Views:
    444
    Albert D. Kallal
    Apr 30, 2007
Loading...

Share This Page