×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

'At beginning of table' error message

'At beginning of table' error message

'At beginning of table' error message

(OP)
I have a form which has 2 bound tables. One shown as a detail table frame. On the main form is a field from the detail table which is a period of months followed by another field which is the recall date that has been calculated. To show the correct recall period I have to scroll though the detail table to the last record. However some clients have no records in the detail table frame and hence I get the above message. How can I either bypass the error message or skip to the end of the detail table frame say by tetsing for no record. At present I use the code snippet [detailTable.End()]in the Arrive section of the key field.

thanks,

Lewy

RE: 'At beginning of table' error message


Perhaps use a try onfail endtry block around that statement.

Then kill the error message, or pop your own.

try
  detailTable.End()
onFail
 errorclear()
; msgstop("Error","No detail records")
endTry

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: 'At beginning of table' error message


You could also create and link on a secondary index (on the detail) that causes the detail table to be sorted in reverse, showing most recent at the top.  Then there shouldn't be a need to scroll, if I understand correctly.

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: 'At beginning of table' error message

(OP)
Tony,
Thanks for the help. I like the idea of sorting the detail table in reverse order. I am able to create a secondary index on the table but how do I implememnt it on the form?

Lewy

RE: 'At beginning of table' error message



You need to link the tables on that secondary to the main table.

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: 'At beginning of table' error message

(OP)
The detail table is linked by the client ID. The table frame shows a list of visits to our practice. So how would I show this detail table sorted in most previous visit first? the detail table is keyed on an integer value. Sorry to be awkward but I sometimes get a mental block on these matters!!

Lewy

RE: 'At beginning of table' error message


Create a new 2ndary index.

Include the client ID, as well as whatever field will sort by latest visit.

Define that second field sort as Descending.

Then link the detail table on the new secondary index instead of the Client ID alone.

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: 'At beginning of table' error message

(OP)
Thank you Tony, solution was too simple for my own good! I always seem to look for the most complicated answer...

Have a good weekend, Lewy

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close