[AccessD] Next, Prev

Stuart McLachlan stuart at lexacorp.com.pg
Thu Sep 4 21:01:15 CDT 2008


NextItemID = 
Dlookup("ID","qryMyFormQuery","[Name] > " & [Name])


Incidentally, it's very bad practice to use "Name" as a field name - it can bite you in all sorts 
of ways.


On 5 Sep 2008 at 10:51, Kath Pelletti wrote:

> Must be the week for working on Next, Prev functions on the list............
> 
> This is a bit of an odd situation, but what I have a continuous form which displays names and ID's. It's source is a query which is sorted by the Name field.
> 
> In another area of the application, I need to be able to know the ID of the 'next' rec in that continuous form.
> 
> eg. Continuous form shows:
> Name                 ID
> AAB                    90312
> AAC                    23
> AAD                    845
> AAE                     32
> 
> If I have a form for AAB open, I need to get the ID of the next item AAC, which is 23. 
> 
> Maybe I am making this too hard, but the fact that the list is alphabetically sorted has me thrown...............
> 
> tia
> Kath
> 
> ______________________________________
> Kath Pelletti
> Software Design and Solutions Pty Ltd
> kp at sdsonline.net
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

-- 
Stuart Mclachlan





More information about the AccessD mailing list