|
message: 1 date: Tue, 11 Oct 2005 15:17:28 -0500 (Central Standard Time) from: "Booth Martin" <booth@xxxxxxxxxxxx> subject: What do you do when a subfile has no records? What do you do when a subfile has no records? As I program yet another subfile it dons on me that my solution for an empty subfile is not very elegant, and probably isn't even very good. What do others do? --- Since I've been reading Booth's posts for a long time and seen code he's posted, I am inclined to disagree with his quality rating. However, to answer your question, it depends on the application. My solutions have been: 1) If I'm broke, my code credits my bank account, debiting the user's bank account by the corresponding amount. To determine the amount, I use SFLPAG as a multiplier, and the user's age as the base. Older IT people should know where their data is. 2) If I'm feeling annoyed, I just shock the user, and send the message, "No data --- BAD!" 3) If I'm feeling psychological, I just shock the user, and send the message, "How did that make you feel?" 4) Otherwise, I do what most programmers do-- I send a message to the message subfile, saying "No records available. Press F6 to add records." If message subfiles aren't shop standard (:::sigh:::), I create an alternate record format that says "No records available. Press F6 to add records," and display that in place of the empty subfile. It's fugly, but it does work. -Doc P.S. Under advice of counsel, I cannot post the code to solutions 1, 2, or 3. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.