Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    9

    Unanswered: Dialog Form question

    Hello ... I'm hoping for a few hints here.

    I have a combo box on a form that has a button beside it called "Add". When the user clicks "Add" it opens a dialog form that allows them to add values to the table from which the combo box gets its data (then that box is requeried, etc etc) It works great, however, I need to limit them to ONE addition when they hit "Add". Right now if they keep tabbing through the dialog form it, of course, allows them to continue putting new values in. How can I stop it from presenting a new entry screen to them?

    I hope I've worded this OK ... I'd appreciate any help you might be able to offer.

    Thank you!

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    Edit: in afterupdate event of the dialog form add:
    docmd.close

    this will close the dialog form after a new value inserted. plus you can set Cycle Property of form to current record which won't let tab function to go to next record.
    Last edited by ghozy; 08-13-04 at 15:07. Reason: code fix
    ghozy.

  3. #3
    Join Date
    Jul 2004
    Posts
    9
    Thank you! Sorry for the newbie questions!!

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Another way to do it is to set the Cycle property of the form to Current Record. You can find this property in the Form properties under the Other tab.

  5. #5
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    you're welcome. as long as it is a question that I can answer; I don't mind if it is a newbie one or not.
    ghozy.

Posting Permissions

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