Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record position

Status
Not open for further replies.

oscarse

Programmer
Apr 9, 2006
99
CA
I have a table with 3 fields ID, Suffix, Date

The ID & suffix combined make up the primary index ... I have a form which finds the last entry (by date) via the form load event ... the form record source then uses the found ID to find all the associated id-suffix records. Using DESC on the date field gets the correct first record but there is confusion because the record suffix is opposite the record counters ie assume 4 suffixes of 1, 2, 3 and 4 as the date for 4 will be the latest it will then show up as record 1 suffix 4 record 2 suffix 3 etc ... if I instead order the records in matching order then the form ends up starting on record 1 suffix 1 ... is there some way to move the opening record block to the last record using code? I am thinking one of the later open form events (like got focus) might be used to submit a recordset position?
 
How are ya oscarse . . .

[blue]The record counter has nothing to with your id or suffix.[/blue] The counter is relative to the number of records returned by the [blue]forms recordsource[/blue], with record 1 always at the top of the form and sequentially running down. It shows the position of the currently selected record, and that is its function. Bear in mind the counter also accounts for record additions and deletions and adjusts accordingly. What is now record 5 can change because of this.

So it appear you have what you want . . . [blue]you just have to stop relating to or looking at the counter.[/blue] [thumbsup2]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top