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 Wanet Telecoms Ltd 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. mjcmkrsr

    List Out Missing Numbers of a Number Range

    Hi Yes - ALL values in the chosen range. In your case laAllValues[1] = 15 and laAllValues[2] = 1 hth MarK
  2. mjcmkrsr

    List Out Missing Numbers of a Number Range

    Hi, Please find below a sketch of code. Feel free to adapt to your needs. LOCAL ARRAY laAllValues[1] CREATE CURSOR csrValues (iValue I) FOR i = 1 TO 25 INSERT INTO csrValues VALUES (INT(RAND() * 50)) ENDFOR SELECT MAX(iValue), MIN(iValue) FROM csrValues INTO ARRAY laAllValues CREATE...
  3. mjcmkrsr

    Variables: NULL vs RELEASE

    Please do also have a look at https://www.tek-tips.com/threads/null-or-null.1828940/ hth MarK
  4. mjcmkrsr

    Visual foxpro matrix framework

    Hi, Please have a look at https://www.tek-tips.com/threads/need-expert-level-promatrix-help.1824078/ hth MarK
  5. mjcmkrsr

    SQL Command to Show Monthly Sales Including Months with Zero Sales

    Hi, ... and my 2c &&& ldDate any local date variable &&& the functions: d to show that it is a DATE - First Day of Month - Last Day of Month dFDofMonth = ldDate - DAY(ldDate) + 1 dLDofMonth = GoMonth(ldDate,1) - Day(GoMonth(ldDate,1)) MarK
  6. mjcmkrsr

    SQL Command to Show Monthly Sales Including Months with Zero Sales

    Hi, ... and my contribution PUBLIC goFormSales goFormSales=NEWOBJECT("clsForm") goFormSales.Show Read Events Close all Clear All RETURN ************************************************** DEFINE CLASS clsForm AS form AutoCenter = .T. Caption = "Grid with calculated columns"...
  7. mjcmkrsr

    Reading MySQL 8 encoded data into VFP9

    Hi Gguerra, A little demo how you may handle memo fields in an editbox on a form, an editbox in a grid and as MEMO field in a grid. PUBLIC go_Form go_Form = CREATEOBJECT("clsForm") go_Form.Visible = .T. go_Form.Show READ Events CLOSE ALL CLEAR ALL RETURN ********* DEFINE CLASS clsForm...
  8. mjcmkrsr

    Persistent error in storing JPG in general field VFP 9.0: OLE error code 0x80040011: Not able to convert object.

    ... Thanks Chriss. I don't have anything to add to your explanations and couldn't have done it better. No, this was demo code for pictures in a grid - nothing more and nothing less. Adding pictures to a form or report is straightforward - see adapted code below. Public goForm goForm =...
  9. mjcmkrsr

    Persistent error in storing JPG in general field VFP 9.0: OLE error code 0x80040011: Not able to convert object.

    ... and some demo code (pictures in a grid) to illustrate Chriss's advice Public oForm oForm = Createobject('myForm') oForm.Show() READ EVENTS CLOSE ALL CLEAR ALL ********** DEFINE Class myForm As Form Height = 360 Width = 840 MinWidth = This.Width MaxWidth = This.Width Add...
  10. mjcmkrsr

    What is the correct or best approach in editing a table?

    Hi Doug, You'll need this unique record identifier at the latest asa your table is part of an updatable view Your're right - the RECNO() order won't change but the RECNO() WILL change, and you won't be able to find the formerly associated record hth MarK
  11. mjcmkrsr

    What is the correct or best approach in editing a table?

    ... and to illustrate Chriss's explanations - post above paragraph 2 - please see demo code below. SET DELETED ON CLOSE ALL &&& Create cursor with names CREATE CURSOR curNames (cPKey C(4), cName C(10)) INSERT INTO curNames VALUES ( "1000","Joe") INSERT INTO curNames VALUES ( "1001","Sam")...
  12. mjcmkrsr

    What is the correct or best approach in editing a table?

    Hi Mandy, Maybe REPLACE won't work either if you cannot determine the reason why UPDATE sometimes works and sometimes not hth MarK
  13. mjcmkrsr

    What is the correct or best approach in editing a table?

    Hi Mandy, If you occasionally have to update the transaction table you could use a filtered browse e.g. use transaction table browse for transactionid = "0001" and do the required updates or replace in transaction all amounts with 890 for amount = 340 and transactioncode = "0001" or...
  14. mjcmkrsr

    Grid - control source being ignored.

    ... or simply hide the column(s) you don't want to be displayed (demo code below) ************************************************** PUBLIC oForm oForm = NEWOBJECT("form1") oForm.Show Read Events Close all Clear All RETURN ************************************************** DEFINE CLASS...
  15. mjcmkrsr

    .dbf files mysteriously gone missing (or being deleted)

    Hi Vince, Please use PACK with extreme caution and best in an environment where no other user can (try to) access the file during the pack process. From Hacker's Guide to Visual Foxpro hth MarK
  16. mjcmkrsr

    Report layout differs when running

    Hi, You may want to have a look at Format - Snap to Grid (I have it checked) and Format - Set Grid Scale (I have it at 6 pixels) in the Report designer. hth MarK
  17. mjcmkrsr

    Copy fields from one table to another

    Hi, Wrong - you may want to read more carefully the report layout: the data from your former Detail 1 band are now in the Group header 1 called "localiza" whereas the data from your former Detail 2 band are now in the Detail band. If you own the book "What's New in Nine: Visual Foxpro's...
  18. mjcmkrsr

    Sum of values in a Report Detail band

    Hi, Below a demo with 4 cursors to show how to calculate values per record(s), the group(s) footer(s) and the total on the last page footer. hth MarK
  19. mjcmkrsr

    Position form in another form when radio clicked

    Hi, You may want to have a look at the demo code below - not very fancy, but it might give you an idea. oForm = CREATEOBJECT("clsMainForm") oForm.Visible = .T. oForm.SHOW() Read EVENTS CLOSE ALL CLEAR ALL RETURN *!* Define Main Form Class Define CLASS clsMainForm AS FORM...
  20. mjcmkrsr

    Set a TAG for a field programmaticaly

    ... of course since you closed CLIENTES several lines up in your code - and you wrote it yourself! Tables may only be SELECTed if they are open. hth MarK

Part and Inventory Search

Back
Top