Results 1 to 3 of 3

Thread: Can I do This?

  1. #1
    jakk
    Guest

    Question Can I do This?

    using a loop I search through a dataset, if a match is not found, i then open another form that reads the original database recordset, I would like at this point to add a new record, close the opened form, make the original form visible and continue the code from where I left off in the original loop.
    ie.

    do until

    seek
    found a match do this
    blah blah...
    NOT found a match
    open other form
    view records
    add new record
    save
    close form
    continue with code
    loop

    The problem is that when I do this, a) the original code within the loop wants to continue, b) probably because of this I can't update the datagrid on the newly opened form......any hints?

  2. #2
    Si_the_geek
    Guest
    You could try showing the form Modally (see the help on Show), that way your code won't continue until the form is closed again. Obviously you will have to put all of the code to work with the form into the form itself.

  3. #3
    AIS_DK
    Guest
    Trye opening the new form with this code:

    Code:
    frmNew.show vbmodal, me
    this shows the form in modal mode, which breaks the execution flow of the calling form. Perhaps that will fix your problem.

Posting Permissions

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



Click Here to Expand Forum to Full Width