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. Shardlow

    how to delete part of a string on the fly

    Hi Nifrabar, The function you want is strtran() for example: MyString = strtran("This is my special string", "special") ? MyString && This is my string
  2. Shardlow

    error with MOD()

    Hi FoxTeam1, For starters Mod(60000000000000001/23) is an invalid function call. The mod function takes 2 parameters something like Mod(60000000000000001, 23). Secondly the mod() function returns the remainder of a division not the result of a division. For example the result of...
  3. Shardlow

    find and replace 2 or more spaces

    Sorry Borsker, I used the wrong function. Try this: REPLACE ALL cField WITH STRTRAN(cField, space(2), space(1)) Goodluck, Shardlow.
  4. Shardlow

    find and replace 2 or more spaces

    Hi Borsker, To replace 2 spaces with 1 space use this: REPLACE ALL cField WITH CHRTRAN(cField, space(2), space(1)) I think this is what you want, Shardlow.
  5. Shardlow

    VFP 6 string substitution

    PW try this: local lcPlace local lcAddr local a for a 1 to 10 lcPlace = "Place" + transform(a) lcAddr = "Addr" + transform(a) if not empty(Temp2.&lcAddr) replace &lcPlace with Temp2.&lcAddr in Temp1 endif endfor Goodluck, Shardlow
  6. Shardlow

    VFP 6 SET SKIP Problem

    Hi ewachs2, You wrote: "I believe your concern about the GO BOTTOM statement is avoided by the SEEK statement between the SET EXACT statements." Based on your sample code, the SEEK statement would just return the record pointer to the last record in the parent table. I am of course assuming...
  7. Shardlow

    VFP 6 SET SKIP Problem

    Hi ewachs2, Your program listing above is great - but it has a few flaws, unfortunately they may have nothing to do with your problem and are probably just an oversight. The child table in your sample code doesn't have an order set, so the relationship won't work. Due to the "go bottom", the...
  8. Shardlow

    How to get VFP to display special characters

    Hi Jimstarr, I agree with MikeLewis that it is probably something to do with your configuration. However I think it is your Windows configuration. You posted that "Æ" becomes "?"; "Æ" is a unicode character and when ? is printed in VFP it means that VFP didn’t know how to convert this...
  9. Shardlow

    Unable to find Unknown CSTR

    Hi jonwondering, It may be that they have provided you with the function cstr(), but it may not be part of the project. Shardlow.
  10. Shardlow

    Function returns single Var iso Array

    Hi Nifrabar, I don't think you can return an array via the return command. What I would do is to declare the array in your main program and then pass it to CloseProjects() as a parameter. At the moment when you execute the line RETURN laProjects it will just return the 1st element in the array...
  11. Shardlow

    COPY TO with long dir names?

    Hi Frank, Try this: gcHomeDirectory = JUSTPATH(SYS(16,0)) SET DEFAULT TO (gcHomeDirectory) gcAppName = GETFILE("EXE","","",0,"Select Application") lcName = JUSTFNAME(gcAppName) gcAppName = "'" + gcAppName + "'" COPY FILE &gcAppName TO &lcName Goodluck, Adrian.
  12. Shardlow

    Function and paramaters

    Hi Louis, Make sure there isn't a table in the current work area with a column called Par4. Otherwise the value in the table will be used over the variable. Good luck, Shardlow.
  13. Shardlow

    another select - sql question

    Hi R17, Do you only need the results for Nov and Dec or are there an unlimited number of months to collect data for?
  14. Shardlow

    PUBLIC, PRIVATE & LOCAL

    Irabyy, You are of course right on both points, but that was just the way the company I worked for wanted their code to be structured. All variables and arrays had to be declared and passed to whatever method used them in the manner I have done above. This provided consistency throughout the...
  15. Shardlow

    PUBLIC, PRIVATE & LOCAL

    I like to make all my variables LOCAL except for arrays which I declare as PRIVATE. This is for scoping reasons as I find arrays don't pass very well, as in my example below. The 2nd time This.ArrayTest() is called it crashes as the local array is out of scope. DEFINE CLASS TestClass AS...
  16. Shardlow

    Selective deletion of records in grid

    I like to add a new column of check boxes as the 1st column in the grid; where the user can tick which records they would like to delete. In the right click method I add a menu where the user can tick all, untick all or tick rest. Then when the user clicks on the delete menu option, the...

Part and Inventory Search

Back
Top