PC Review

Thread Tools Rate Thread

Re: Form won't show last record

John Vinson
Posts: n/a
      5th Sep 2003
On Fri, 5 Sep 2003 08:26:14 -0700, "Michael Bentfeld"
<(E-Mail Removed)> 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


John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
Reply With Quote

« Trim Function | Re: »
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show the last record based on the last recorded date - JCW JohnW Microsoft Access Queries 0 22nd Nov 2009 05:03 PM
Last record problem, is it really the last record? =?Utf-8?B?ZWZhbmRhbmdv?= Microsoft Access Form Coding 1 23rd Jul 2007 01:44 AM
Last record problem, is it really the last record? =?Utf-8?B?ZWZhbmRhbmdv?= Microsoft Access VBA Modules 1 23rd Jul 2007 01:44 AM
Re: Match Last day of this month to last day of last month Don Guillett Microsoft Excel Misc 0 6th Dec 2006 04:08 PM
Form code: how do I run code every time a record is "loaded" by going to next record, last record, etc. Dave R. Microsoft Access Macros 1 24th Jun 2005 07:37 PM




All times are GMT +1. The time now is 05:53 AM.