Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312

    Unanswered: Form Display Problems

    For whatever reason I can't seem to figure this out. All I want to do is run a procedure after the form has fully displayed without using the Timer Event (I need it for something else).

    If I add the procedure to the On Current event the form never displays. Is there an Event I am missing that kicks off when the form is completed?

  2. #2
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by DCKunkle
    For whatever reason I can't seem to figure this out. All I want to do is run a procedure after the form has fully displayed without using the Timer Event (I need it for something else).

    If I add the procedure to the On Current event the form never displays. Is there an Event I am missing that kicks off when the form is completed?

    Why don't you try the "Before Update" or "After Update" selections on the form?

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Why don't you try the "Before Update" or "After Update" selections on the form?
    Because those events won't fire until a record is changed and the user moves to another record, exits or otherwise goes to save the change, and that's not what the OP wants.

    What is this "proceedure?"
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Run the PUBLIC procedure in the line immediately after your docmd.openform "FrmXXX" line in the other form. Better yet, make it a Public function which you can call. For ex:

    domcd.openform "FrmXXX"
    Forms!FrmXXX.ProcName
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    May 2007
    Posts
    38
    if yuo have an empty table/recordset and you are opening the form with a non updateable record set eg no additions, then you get an empty form, and no current event

    put a breakpoint in the code on the form open, and trace the code execution

  6. #6
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Sorry, meant to reply earlier, but I got sidetracked. If you have loaded SQL Server 2005 and seen how the progress is shown then you will understand more what I am trying to do. If you haven't seen it before, it lists all of the tasks that it must do. By checking off items as they are completed the user gets some feedback of how much is left to do and that things are still happening.

    The process I am trying to show is a multi-step process that will take about 15-30 minutes. So I want to show the user that things are progressing. I have x tasks and each task has up to 3 steps. So I just want to show all the taks and check them off as they are completed. I also want to show a progress bar as I am working on a task (Exporting... then Exporting......). I need the Timer event for that.

    I populate a table with all the tasks and then the form shows the list of tasks. The user does nothing but sit back and watch. The problem is the logic that loops through the tasks needs to get kicked off at some point. I currently have that procedure in the Action List form and if it is in On Current, then the form doesn't appear. Any other Event is either before On Current or will not fire without user intervention. I also wanted to open it with acDialog so that I could run some code after the form closes. However I may have to follow PKStormy's suggestion and put the procedure in the calling form.

  7. #7
    Join Date
    May 2007
    Posts
    38
    i like to do this with long processes - you could use the access progress meter - syscmdobj or something like that -

    alternatively i think you have to force screen repaint with me.repaint , because access wont refresh screen updates until a record changes or something similar. - thats probably why your seeing a dead screen

Posting Permissions

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