Subject Re: Menu problem still plus others
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Thu, 06 Aug 2020 04:59:17 -0400
Newsgroups dbase.getting-started

Hi Tony,

I suspect the reason that MbcMenu works and not AllPro is that generally in AllPro you issue the form.close() command after you have called the form.  Which may well just close the form you have opened.  You probably never see it.
I have not tested this but you can.

In MbcMenu you issue form.close immediately before the "do form" comamnd which closes the "Menu form" before opening the form you want.

Hope that helps,
Andy

> Yes Mervy - I would be happy to converse with you on on one if I do not drive you nuts ??
>
> Tony Hughes - tamarak1@bigpond.com
>
>
> THIS CODE EXECUTES ??
>
> Mbc Menu As below - This code executes OK ??
>
> ** END HEADER -- do not remove this line
> //
> // Generated on 06/08/2020
> //
> parameter bModal
> local f
> f = new mbcindexForm()
> if (bModal)
>    f.mdi = false // ensure not MDI
>    f.readModal()
> else
>    f.open()
> endif
>
> class mbcindexForm of FORM
>    with (this)
>       onOpen = class::FORM_ONOPEN
>       metric = 6        // Pixels
>       height = 500.0
>       left = 406.0
>       top = 6.0
>       width = 563.0
>       text = "MBC Menu"
>    endwith
>
>    this.DATABASE1 = new DATABASE(this)
>    with (this.DATABASE1)
>       left = 247.0
>       top = 223.0
>       width = 53.0
>       height = 37.0
>    endwith
>
>    this.ADMINISTRATION1 = new QUERY(this)
>    with (this.ADMINISTRATION1)
>       left = 476.0
>       top = 27.0
>       width = 84.0
>       height = 37.0
>       sql = 'select * from "C:\Users\Anthony Hughes\Desktop\Mbcdisplay\Administration.DBF"'
>       active = true
>    endwith
>
>    this.QUERY1 = new QUERY(this)
>    with (this.QUERY1)
>       left = 241.0
>       top = 96.0
>       width = 39.0
>       height = 37.0
>       database = form.database1
>    endwith
>
>    this.PUSHBUTTON1 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON1)
>       onClick = class::PUSHBUTTON1_ONCLICK
>       height = 24.0
>       left = 42.0
>       top = 270.0
>       width = 107.0
>       text = "TV Display A- Z"
>    endwith
>
>    this.PUSHBUTTON2 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON2)
>       onClick = class::PUSHBUTTON2_ONCLICK
>       height = 24.0
>       left = 42.0
>       top = 315.0
>       width = 107.0
>       text = "Locker Room"
>    endwith
>
>    this.PUSHBUTTON3 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON3)
>       onClick = class::PUSHBUTTON3_ONCLICK
>       height = 24.0
>       left = 42.0
>       top = 369.0
>       width = 107.0
>       text = "Maintain"
>    endwith
>
>    this.TEXTLABEL1 = new TEXTLABEL(this)
>    with (this.TEXTLABEL1)
>       height = 29.0
>       left = 105.0
>       top = 18.0
>       width = 332.0
>       text = "MEREWETHER BOWLING CLUB LIMITED"
>       colorNormal = "Red/0xf0f0f0"
>       fontSize = 13.0
>       fontBold = true
>       fontItalic = true
>       fontUnderline = true
>    endwith
>
>    this.IMAGE1 = new IMAGE(this)
>    with (this.IMAGE1)
>       height = 144.0
>       left = 35.0
>       top = 63.0
>       width = 175.0
>       dataSource = 'FILENAME "C:\Users\Anthony Hughes\Desktop\AllproTest\alproicon.jpg"'
>       borderStyle = 1        // Raised
>    endwith
>
>    this.SPINBOX1 = new SPINBOX(this)
>    with (this.SPINBOX1)
>       onChange = class::SPINBOX1_ONCHANGE
>       dataLink = form.administration1.rowset.fields["displaytime"]
>       height = 22.0
>       left = 203.0
>       top = 270.0
>       width = 56.0
>       rangeMax = 100
>       rangeMin = 1
>    endwith
>
>    this.SPINBOX2 = new SPINBOX(this)
>    with (this.SPINBOX2)
>       onChange = class::SPINBOX2_ONCHANGE
>       dataLink = form.administration1.rowset.fields["duration"]
>       height = 22.0
>       left = 203.0
>       top = 324.0
>       width = 56.0
>       rangeMax = 100
>       rangeMin = 1
>    endwith
>
>    this.TEXTLABEL2 = new TEXTLABEL(this)
>    with (this.TEXTLABEL2)
>       height = 22.0
>       left = 287.0
>       top = 270.0
>       width = 175.0
>       text = "Set Display Time (Seconds)"
>    endwith
>
>    this.TEXTLABEL3 = new TEXTLABEL(this)
>    with (this.TEXTLABEL3)
>       height = 22.0
>       left = 284.0
>       top = 326.0
>       width = 122.0
>       text = "Set Duration (Hours)"
>    endwith
>
>    this.DATETIMEPICKER1 = new DATETIMEPICKER(this)
>    with (this.DATETIMEPICKER1)
>       onOpen = class::DATETIMEPICKER1_ONOPEN
>       height = 147.0
>       left = 301.0
>       top = 63.0
>       width = 175.0
>    endwith
>
>    this.TEXTLABEL4 = new TEXTLABEL(this)
>    with (this.TEXTLABEL4)
>       height = 22.0
>       left = 295.0
>       top = 370.0
>       width = 202.0
>       text = "23 Caldwell Street, Merewether"
>    endwith
>
>    this.TEXTLABEL5 = new TEXTLABEL(this)
>    with (this.TEXTLABEL5)
>       height = 22.0
>       left = 293.0
>       top = 415.0
>       width = 162.0
>       text = "Phone :   02/49631461"
>    endwith
>
>    this.PUSHBUTTON4 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON4)
>       onClick = class::PUSHBUTTON4_ONCLICK
>       height = 24.0
>       left = 42.0
>       top = 432.0
>       width = 122.0
>       text = "TV Display Z -- A"
>    endwith
>
>    this.rowset = this.administration1.rowset
>
>    function DATETIMEPICKER1_onOpen()
>       form.datetimepicker1.value = date()
>       return
>
>    function PUSHBUTTON1_onClick()
>       form.close()
>                 do Displaymbc.wfm
>       return
>
>    function PUSHBUTTON2_onClick()
>      
>                 do mbclocker.wfm
>       return
>
>    function PUSHBUTTON3_onClick()
>       form.close()
>                 do mbcmaintain.wfm
>       return
>
>    function PUSHBUTTON4_onClick()
>       form.close()
>                 do mbcdisplay.wfm
>       return
>
> THIS CODE DOES NOT EXECUTE.??
>
> I can not see the reason ??
>
> // Allpro Menu As below
>
> ** END HEADER -- do not remove this line
> //
> // Generated on 06/08/2020
> //
> parameter bModal
> local f
> f = new StartForm()
> if (bModal)
>    f.mdi = false // ensure not MDI
>    f.readModal()
> else
>    f.open()
> endif
>
> class StartForm of FORM
>    with (this)
>       onOpen = class::FORM_ONOPEN
>       metric = 6        // Pixels
>       height = 497.0
>       left = 564.0
>       top = 35.0
>       width = 484.0
>       text = ""
>    endwith
>
>    this.ALLPROICON = new IMAGE(this)
>    with (this.ALLPROICON)
>       height = 99.0
>       left = 0.0
>       top = 0.0
>       width = 117.0
>       dataSource = 'FILENAME "C:\Users\Anthony Hughes\Desktop\allprotest\alproicon.jpg"'
>       alignment = 3        // Keep Aspect Stretch
>       borderStyle = 1        // Raised
>    endwith
>
>    this.PUSHCLOSE = new PUSHBUTTON(this)
>    with (this.PUSHCLOSE)
>       onClick = class::PUSHCLOSE_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 441.0
>       width = 119.0
>       text = "Close Menu"
>       fontSize = 12.0
>       fontBold = true
>       colorNormal = "Red/BtnFace"
>    endwith
>
>    this.PUSHEMP = new PUSHBUTTON(this)
>    with (this.PUSHEMP)
>       onClick = class::PUSHEMP_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 99.0
>       width = 120.0
>       text = "Employee's"
>    endwith
>
>    this.PUSHRAWS = new PUSHBUTTON(this)
>    with (this.PUSHRAWS)
>       onClick = class::PUSHRAWS_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 225.0
>       width = 120.0
>       text = "Raws Product"
>    endwith
>
>    this.PUSHRAWSADJ = new PUSHBUTTON(this)
>    with (this.PUSHRAWSADJ)
>       onClick = class::PUSHRAWSADJ_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 45.0
>       width = 120.0
>       text = "Adjust Raws"
>    endwith
>
>    this.PUSHFORMULA = new PUSHBUTTON(this)
>    with (this.PUSHFORMULA)
>       onClick = class::PUSHFORMULA_ONCLICK
>       height = 24.0
>       left = 147.0
>       top = 153.0
>       width = 120.0
>       text = "Formula's"
>    endwith
>
>    this.PUSHTESTBATCH = new PUSHBUTTON(this)
>    with (this.PUSHTESTBATCH)
>       onClick = class::PUSHTESTBATCH_ONCLICK
>       height = 46.0
>       left = 147.0
>       top = 306.0
>       width = 120.0
>       text = "Tast Batch Make Batch"
>    endwith
>
>    this.PUSHBUTTON1 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON1)
>       onClick = class::PUSHBUTTON1_ONCLICK
>       height = 46.0
>       left = 336.0
>       top = 306.0
>       width = 120.0
>       text = "Forward Estimates"
>    endwith
>
>    this.PUSHBUTTON2 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON2)
>       onClick = class::PUSHBUTTON2_ONCLICK
>       height = 24.0
>       left = 329.0
>       top = 45.0
>       width = 107.0
>       text = "Order Raws"
>    endwith
>
>    this.PUSHBUTTON3 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON3)
>       onClick = class::PUSHBUTTON3_ONCLICK
>       height = 24.0
>       left = 329.0
>       top = 99.0
>       width = 107.0
>       text = "Receive Raws"
>    endwith
>
>    this.PUSHBUTTON4 = new PUSHBUTTON(this)
>    with (this.PUSHBUTTON4)
>       onClick = class::PUSHBUTTON4_ONCLICK
>       height = 24.0
>       left = 329.0
>       top = 153.0
>       width = 107.0
>       text = "Raws Grid"
>    endwith
>
>
>    function PUSHBUTTON1_onClick()
>       do allproahead.wfm
>       form.close()
>       return
>
>    function PUSHBUTTON2_onClick()
>       do allproorders.wfm
>       form.close()
>       return
>
>    function PUSHBUTTON3_onClick()
>       do allproreceivals.wfm
>       form.close()
>       return
>
>    function PUSHBUTTON4_onClick()
>       do allprodetail.wfm
>       form.close()
>                 return
>
>    function PUSHCLOSE_onClick()
>    form.close()  
>       return
>
>    function PUSHEMP_onClick()
>       do allproemp.wfm
>       form.close()
>                 return
>
>    function PUSHFORMULA_onClick()
>       msgbox (" Try One "  )
>                 do allproformula.wfm
>                 form.close()
>       return
>
>    function PUSHRAWSADJ_onClick() // = {;msgbox(set("directory")); do MbcDisplay.wfm}
>     do allproadjust.wfm
>          form.close()
>                 return
>
>    function PUSHRAWS_onClick()
>       do allproraws.wfm
>       Form.Close()
>                 return
>
>    function PUSHTESTBATCH_onClick()
>       do allprobatch.wfm
>       return
>
>
>
>