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 strongm 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

    ...USE Eval IN 0 SELECT Eval This.RowSource = 3 This.RowSourceType = ; 'select Projname, Id'+; ' from '+; ' (select sys(2015) as mySorter, * from Eval) tmp' +; ' order by mySorter desc' +; ' into cursor crsMyList' The debugger indicates the error is associated with...
  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

    ...to set the message visible and to enable the timer event works better than setting those directly with my other code. ThisForm.SetMessage() * *Code as in my original post ** ***SetMessage Method THISFORM.MESSAGE.VISIBLE = .T. ThisForm.cdtimer1.Enabled = .T. ****Timer Event*** IF...
  12. CDavis

    Word Automation Wait Message

    ...= .F. when the user closes the Word document. How can I test for that condition? #DEFINE CR CHR(13) #DEFINE CR2 CHR(13) + CHR(13) *** Other Define Statements *** THISFORM.MESSAGE.VISIBLE = .T. RELEASE ALL LIKE o* PUBLIC oWord LOCAL oWord, oDocument, oRange oWord =...
  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

    ...This leads me to believe that neither the TableUpdate() nor TableRevert() were firing. =TABLEUPDATE(.T.,.T.,"Eval") ThisForm.SavePress = .T. *THISFORM.BUTTONS.Reset.Click() Browse THISFORM.BUTTONS.EXIT.SETFOCUS That leads me to conclude that the call to Reset.Click() must be interfering...
  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

    ...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 =CURSORSETPROP("Buffering", 5, "EVAL") && Set buffering mode...

Part and Inventory Search

Back
Top