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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. CDavis

    Record Order

    Ah, Now that is what I was looking for in my original post: "Can the table itself be in descending order based for example on record number?" I can definitely see the advantage here. Thanks Cetin and even if you have a galaxy, there's probably room for another star. With that, I'll let you...
  2. CDavis

    Record Order

    Thanks Cetin, I appreciate you taking the time to explain the benefits of your approach and I think in most cases your approach makes good sense. The amount of time you've taken to help me with this is worth a Star. In this particular case, the table doesn't have a field set as the primary...
  3. CDavis

    Record Order

    Thanks, That solved the error and the listbox does display the information from myField in reverse order to the records in the table. I'm not sure which solution I'll end up using. The coding is approximately the same length and in either case the listbox contents are not tied to the table...
  4. CDavis

    Record Order

    Cetin, Thanks for the additional suggestion. I'm sorry its taken me a while to get back to you. I put the following code snippet in the init of the listbox. It throws an error: "Data type is invalid for this property" USE Eval IN 0 SELECT Eval This.RowSource = 3 This.RowSourceType = ...
  5. CDavis

    Record Order

    Alan, My goal was not to add another field or index tag which I think would be required to display the table contents in reverse order of how the records were saved. Setting an index on a character field in descending order would not achieve the goal. I think that I would need to add a...
  6. CDavis

    Record Order

    Cetin, I appreciate you taking a look at this. I haven't tested your suggestion but on the surface it looks like the resulting cursor would be ordered descending by the contents of myField. In my case the field is character and I would end up with an alphabetized list (in descending order)...
  7. CDavis

    Record Order

    Thanks Mike, Your solution works well. I've included the code snippet that I placed in the init of the listbox in case someone else has need of it. SELECT myTable GO Bottom DO WHILE NOT BOF() This.AddItem(myTable.myField) SKIP -1 ENDDO Chuck Davis
  8. CDavis

    Record Order

    I have a list box displaying "myField". I'd like to order the list in reverse order of the entry into the table (last in/top of list). I know that I could create a numeric field that increments for each new entry and then index on that in descending order. Is it possible achieve the goal...
  9. CDavis

    Intercept "Delete Tag" Warning

    Thanks Mike, I knew that there had to be a function but couldn't find it by searching the help file. I also want to thank everyone else who responded with additional advice. I guess an explanation is in order. The module I'm updating is part of a suite of Administrative Tools and not...
  10. CDavis

    Intercept "Delete Tag" Warning

    With VFP 9 I am working on a module that allows the end user to delete an index tag. With SET SAFETY ON, VFP issues a warning when the user attempts to delete a "Primary" or "Candidate" index tag. The warning asks if the user wants to delete it anyway. I want to prevent the user from...
  11. CDavis

    Word Automation Wait Message

    Borislav, Mike, and Cetin, Thanks for taking a look at this with me. I've not taken the time to try Cetin's suggestion as he posted just before me. Mike's timer solution works well. I've posted code snippets below. I don't know why it works better but calling a form method to set the...
  12. CDavis

    Word Automation Wait Message

    (Using VFP 9) Problem: When automating MS Word, I'm using a document template that is the client's letter head. The template loads more slowly than I'd like and so I set ThisForm.Message.visible = .T. ("Creating Word Document...") I'd like to set .Message.Visible = .F. when the user closes...
  13. CDavis

    Strip CR/LF from end of expression.

    Thanks to everyone for posting your thoughts. As I suspected there are many ways to accomplish a task. I'm using VFP 9 so Tamar's suggestion seemed the most elegant and accomplished the task in the fewest lines of code: THISFORM.comment1.VALUE = RTRIM(THISFORM.comment1.VALUE ,1 , CHR(13)...
  14. CDavis

    Strip CR/LF from end of expression.

    Thanks Andy, I always like to look at alternatives and based on your idea, I may test for CHR(13) + CHR(10) together and cut the number of passes through the DO WHILE loop in half. -- Chuck Davis
  15. CDavis

    Strip CR/LF from end of expression.

    Thanks mmerlinn, I did consider using CHRTRAN() -- I should have noted that I want to retain any CR/LF except those that are at the very end of the data. Ultimately I will re-insert a set number of CR/LF for formatting purposes. Some end-users hit the enter key several times at the end of...
  16. CDavis

    Strip CR/LF from end of expression.

    I have several expressions on a data entry form that I will combine and save in a memo field. I want to strip all the CHR(10) and CHR(13) characters from the expressions prior to saving them in the memo field. Is there a better solution than the following? DO While...
  17. CDavis

    Table Update/Revert Behavior

    Tamar, Thanks for jumping in -- TableUpdate was returning .T. Knowing this caused me to look more closely at the code I have in the click event of my "reset" button and led me to the simple root cause. Prior to browsing what I assumed was the Eval table, a different table with similar fields...
  18. CDavis

    Table Update/Revert Behavior

    Jim, Thanks for looking at this with me. I only posted a small portion of the code that resides in the click event of the Save button and the table is selected earlier in the code: SELECT EVAL IF RECCOUNT() = 0 APPEND BLANK ENDIF GO BOTTOM IF NOT EMPTY(EVAL.ID) && Check for Empty Record...
  19. CDavis

    Table Update/Revert Behavior

    Thanks for the reply Mike, its nice to know that my expectations coincide with yours. Some additional context: After saving the data from the data entry form, I'm reseting (initializing) the objects in preparation for a subsequent record. For this particular form, I included a "reset" button...
  20. CDavis

    Table Update/Revert Behavior

    Using VFP 9 General Observation: After appending a blank record and filling the record with a series of replace staments, I issue Tableupdate(). Subsequently Tablerevert() is issued. The record no longer exists. ***Form Init******** IF NOT USED("EVAL") USE EVAL IN 0 ENDIF SET MULTILOCKS ON...

Part and Inventory Search

Back
Top