Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Clicking one control to change another.??

Discussion in 'Information Technology' started by Trial & Error, Oct 28, 2005.

  1. Trial & Error

    Trial & Error
    Expand Collapse
    Guest

    I have a control button on a form that duplicates the entire form... this
    meets all my needs, except for one.

    one field or control on the form is a checkbox.... it gets clicked once a
    booking has been "confirmed"..... when I use the duplicate buton... it
    duplicates the state of that button..... what I would really like is to have
    that chceckbox return to being "un checked" on the duplicate copy of the
    entry.

    Any ideas??

    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    How To Control The 5 Thieves? Questions and Answers Apr 7, 2016
    General Controlling Kaam (Lust) Hard Talk Apr 8, 2014
    USA Sikh Americans join Barack Obama in urging lawmakers on Gun Control Breaking News Mar 29, 2013
    Controversial SGPC Takes Control of Live Telecast at Bangla Sahib Hard Talk Feb 7, 2013
    USA Sikhs Join Gun Control Debate. Meet with Vice President Biden Breaking News Jan 16, 2013

  3. MA

    MA
    Expand Collapse
    Guest

    Trial & Error wrote:
    > I have a control button on a form that duplicates the entire form...
    > this meets all my needs, except for one.
    >
    > one field or control on the form is a checkbox.... it gets clicked
    > once a booking has been "confirmed"..... when I use the duplicate
    > buton... it duplicates the state of that button..... what I would
    > really like is to have that chceckbox return to being "un checked" on
    > the duplicate copy of the entry.
    >
    > Any ideas??
    >
    > Thanks


    Forms!YrSecondForm!Yourcheck = false

    --
    _ _
    Ciao
    MAssimiliano Amendola www.accessgroup.it
    Cisa - Conferenza Italiana per Sviluppatori Access
    Info: www.donkarl.com/it
     
  4. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Trial & Error" <TrialError@discussions.microsoft.com> wrote in message
    news:2C18F3AF-3D8C-4BA4-B3DE-034E8A3BF729@microsoft.com
    > I have a control button on a form that duplicates the entire form...
    > this meets all my needs, except for one.
    >
    > one field or control on the form is a checkbox.... it gets clicked
    > once a booking has been "confirmed"..... when I use the duplicate
    > buton... it duplicates the state of that button..... what I would
    > really like is to have that chceckbox return to being "un checked" on
    > the duplicate copy of the entry.
    >
    > Any ideas??


    That'll depend on the code for the button that duplicates the record.
    Please post that code. It's probably just a matter of adding a line.
    after the duplication has taken place, to set the checkbox to False;
    e.g..,

    Me!MyCheckBox = False

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  5. Trial & Error

    Trial & Error
    Expand Collapse
    Guest

    Heres the code for the duplication button....

    Private Sub Duplicate_Registration_Click()
    On Error GoTo Err_Duplicate_Registration_Click


    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

    Exit_Duplicate_Registration_Click:
    Exit Sub

    Err_Duplicate_Registration_Click:
    MsgBox Err.Description
    Resume Exit_Duplicate_Registration_Click

    End Sub




    "Dirk Goldgar" wrote:

    > "Trial & Error" <TrialError@discussions.microsoft.com> wrote in message
    > news:2C18F3AF-3D8C-4BA4-B3DE-034E8A3BF729@microsoft.com
    > > I have a control button on a form that duplicates the entire form...
    > > this meets all my needs, except for one.
    > >
    > > one field or control on the form is a checkbox.... it gets clicked
    > > once a booking has been "confirmed"..... when I use the duplicate
    > > buton... it duplicates the state of that button..... what I would
    > > really like is to have that chceckbox return to being "un checked" on
    > > the duplicate copy of the entry.
    > >
    > > Any ideas??

    >
    > That'll depend on the code for the button that duplicates the record.
    > Please post that code. It's probably just a matter of adding a line.
    > after the duplication has taken place, to set the checkbox to False;
    > e.g..,
    >
    > Me!MyCheckBox = False
    >
    > --
    > Dirk Goldgar, MS Access MVP
    > www.datagnostics.com
    >
    > (please reply to the newsgroup)
    >
    >
    >
     
  6. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Trial & Error" <TrialError@discussions.microsoft.com> wrote in message
    news:773D19A8-3B0B-44DE-862B-F114A8CEB332@microsoft.com
    > Heres the code for the duplication button....
    >
    > Private Sub Duplicate_Registration_Click()
    > On Error GoTo Err_Duplicate_Registration_Click
    >
    >
    > DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    > DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
    > DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste
    > Append
    >
    > Exit_Duplicate_Registration_Click:
    > Exit Sub
    >
    > Err_Duplicate_Registration_Click:
    > MsgBox Err.Description
    > Resume Exit_Duplicate_Registration_Click
    >
    > End Sub


    Then basically all you have to do is add a line similar to

    Me!MyCheckBox = False

    (replacing "MyCheckBox" with the name of your check box control), after
    the third DoCmd statement and before the
    Exit_Duplicate_Registration_Click label. However, you may not actually
    see that the check box's value has been changed unless you set focus to
    it. That's what happened with a text box I tested this on, and I think
    it's a display bug. So you may need to do this:

    Me!MyCheckBox = False
    Me!MyCheckBox.SetFocus

    If you want to, you can set the focus to the check box and then to some
    other control.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     

Share This Page