current record

How do I define the current record in a table???
I have a table with 12 columns and 445 rows.
Column types are as follows:
col1 - string
col2 - string
col3 - string
col4 - string
col5 - numeric
col6 - string
col7 - string
col8 - numeric
col9 - numeric
col10 - string
col11 - numeric
col12 - numeric
My scenario is as follows: I have buttons, first, last, next and previous and they work fine. I wish to improve these slightly by adding a message dialog box if the record is already at the first or last record "This is the last/first record".
To do this, I have to be able to define the current record to compare the first, last, prev or next record.

I need the code to do this..
Thanks
traceysmallAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
florisbConnect With a Mentor Commented:
Use the BOF en EoF properties of the table or query. Check them after every table move / insert / whatever by calling a custom buttonRefresh

Maybe better: Use the dbnavigator, to automate these things!

Floris
0
 
JaymolCommented:
Need a little more info.  How is the data being stored?  (TTable, File of Record?)

John.
0
 
Nuno1Commented:
are u using BDE ?
TTable TDataSet ?
0
 
traceysmallAuthor Commented:
Thanks Floris
I'm quite new at Delphi programming and never even knew that there was such an easy way out of my misery..
Thanks again.
0
 
florisbCommented:
No problemo!
0
All Courses

From novice to tech pro — start learning today.