hexagon logo

Forms

We currently fill out a CMM Request Sheet for each part we put on the CMM.

Is it possible to add this information to a Form that comes up at the start of each CMM Program for the details section?

Will then need a Pass / Fail Section at the end of the CMM Program and approval.

I'd like these to appear at the start and end of the CMM Reports

TIA for your help

Attached Files
Parents
  • yes, you can use form-events for example.
    In "EventInitialize" you can write actions to be executed when the form is started.
    in this event you write the current date and time to an text field or a label​

    Within the forms editor there are properties on the right, in this you can open the VBA mini editor by double-clicking on the corresponding event

    within 'EventInitialize' :
    write data to the form
    Text1.Text = CStr(Now)
    imputbox.Text = CStr(Date)
    combobox.Text = CStr(Time)
    



    if you don't want to use the normal variable transfer of the form you can also use another event here

    within 'EventTerminate' (fired when the form is closed in any way):
    you can then read the data from the corresponding fields and do something with it
    you can, for example, write the values here in a pc DMIS variable. (You can find the code for this in the help file)
    Dim DoSomeThingWithThis as String
    DoSomeThingWithThis = Text1.Text
    DoSomeThingWithThis = imputbox.Text
    DoSomeThingWithThis = combobox.Text
    



    there may be build in components that can already do this, but this way you have a pretty good overview of what is happening


    Thank you

    I followed the EventInitialize way which has worked.

    But as per attachments i was looking for date and time to be separate. I changed the code to remove date / time as appropriate but still shows up


    Attached Files
Reply
  • yes, you can use form-events for example.
    In "EventInitialize" you can write actions to be executed when the form is started.
    in this event you write the current date and time to an text field or a label​

    Within the forms editor there are properties on the right, in this you can open the VBA mini editor by double-clicking on the corresponding event

    within 'EventInitialize' :
    write data to the form
    Text1.Text = CStr(Now)
    imputbox.Text = CStr(Date)
    combobox.Text = CStr(Time)
    



    if you don't want to use the normal variable transfer of the form you can also use another event here

    within 'EventTerminate' (fired when the form is closed in any way):
    you can then read the data from the corresponding fields and do something with it
    you can, for example, write the values here in a pc DMIS variable. (You can find the code for this in the help file)
    Dim DoSomeThingWithThis as String
    DoSomeThingWithThis = Text1.Text
    DoSomeThingWithThis = imputbox.Text
    DoSomeThingWithThis = combobox.Text
    



    there may be build in components that can already do this, but this way you have a pretty good overview of what is happening


    Thank you

    I followed the EventInitialize way which has worked.

    But as per attachments i was looking for date and time to be separate. I changed the code to remove date / time as appropriate but still shows up


    Attached Files
Children
No Data