Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2002
    Location
    Cornwall, UK
    Posts
    18

    Unanswered: Problem cancelling new record

    I have a bound form with an option group on it. As a consequence, when I move to a new record, say by mistake and wish to cancel, the option group value is recorded in the underlying table and so there is a new record. Because it does not have required data, I am unable to move away from it. Clearing the form data does not affect the option group value.

    If I unbind the control, then moving away from the record cancels the update but this does not happen with the bound control,

    Ideally, I want the cancellation to happen by moving away from the new record or by clicking on a Clear button but can't get anything to work.

    Ideas would be gratefully received.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Try removing the defaults for the option group field in both the table and form.

    .
    Environment:
    Self Taught In ALL Environments.....And It Shows!


  3. #3
    Join Date
    Mar 2002
    Location
    Cornwall, UK
    Posts
    18

    Please ignore this thread

    Thanks for the suggestion. I had tried that but it made no difference, though I thought it would. However, and something I should have tried before posting (sorry), I have created a testbed form with just the basic functionality and this works perfectly. So, something else is affecting the saving of the record - just don't know what it is at the moment .

    When (if?) I find it, I'll post the reason to close the thread.

  4. #4
    Join Date
    Dec 2005
    Location
    Texas
    Posts
    13
    Quote Originally Posted by Philip Avery
    I have a bound form with an option group on it. As a consequence, when I move to a new record, say by mistake and wish to cancel, the option group value is recorded in the underlying table and so there is a new record. Because it does not have required data, I am unable to move away from it. Clearing the form data does not affect the option group value.

    If I unbind the control, then moving away from the record cancels the update but this does not happen with the bound control,

    Ideally, I want the cancellation to happen by moving away from the new record or by clicking on a Clear button but can't get anything to work.

    Ideas would be gratefully received.
    Hey Phillip,

    I may not be following what your wanting to do but if you did have a "Cancel" button. What does it do if you put Me.Undo behind it? (In the OnClick event of course). Would this do what your after?

  5. #5
    Join Date
    Mar 2002
    Location
    Cornwall, UK
    Posts
    18
    Hi ShaneS

    Sorry for the delay in acknowledging but I've been away. I'll try that and let you know how it goes.

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what happens if your press the ESCape key?
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •