Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Aug 2001
    Location
    Toronto, Ontario, Canada
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form : Before Update or when else to do it? (A97)

    Hi All - need some guidance here as I am stumbling wickedly and wondered if anyone out there could help a bit?

    I have a Main Form with Header information, and a Sub Form with detail information. I want to ensure that all necessary fields on the Main Form are completed and all necessary fields on the Sub Form are completed.

    The BeforeUpdate event on the Main Form checks to make sure that certain fields are entered (e.g. if the Sales Rep is blank a message box pops up asking for Rep name) and the BeforeUpdate event on the Sub Form does the same thing (message boxes)

    Now then, a user can either be entering a complete record for the first time or editing a record for any particular reason; during editing sometimes it may be a field ONLY on the main form that changes, or it might be a field ONLY on the sub form.

    Bottom line, when everything is done I would like to show a message box

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form : Before Update or when else to do it? (A97)

    This has been discussed a number of times in this forum. When you move between a form and subform, whichever one you're leaving saves its current record, which is why you're triggering the BeforeUpdate event every time. You can't rollback *both* a parent form and child form record. You have to rollback a child form record and delete the parent record or else delete both of them if you want to get rid of the record entirely.
    Charlotte

Posting Permissions

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