Results 1 to 6 of 6

Thread: form visibility

  1. #1
    Join Date
    May 2006
    Posts
    4

    Unanswered: form visibility

    ive been programming this stuff for years, and i thought this would be easy...im trying to display a few forms in a certain order from a sub in a module. what i want is for the forms to stay hidden until all controls are painted and filled in and all code run, and then the very last thing is that -pop!- the form becomes visible for the user. alternatively i tried opening a popup form on top of the one filling in, but i simply cant seem to control the closing of the popup to coincide with the finishing of the form painting. so then i fiddled around with .painting and application.echo Again, when i turn these off, there is no way i can figure to do it AFTER all the code has run and the controls filled in. anyone got an easy way for the screen to stay nice and blank with an hourglass until the forms are prepared and ready for entry?

  2. #2
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    I don't know how you have things set up but my prefered method to do this would be to;

    Have a single form load that says;

    "Hang one just a minute while i prepare myself...!"

    Then run the code to prepare the forms (maybe by a macro)

    When the code has finished do a docmd.closefrm FRM_waitaminute

    (in the form 'wait aminute') have a OnClose() linked to a macro to load your (now prepared) forms?

    Just throwing out ideas here??

    Does it help?

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  3. #3
    Join Date
    May 2006
    Posts
    4
    the problem is you say 'when the code has finished do a cmd.close'. so far, i have been unable to programmatically tell when the form i want viewed is completely ready to make visible. so , in your example, when the vba code or macro gets to the close 'wait a minute', then the ones i want will open and they will still be filling in and looking amateurish. im trying to get a form completely ready in a hidden fashion or with a popup on top of it and then when its 'ready' for viewing, then voila! make it visible

  4. #4
    Join Date
    May 2006
    Posts
    4
    what would be great is some event OnFinishedPainting. this event would trigger when the form and all its controls and combo boxs and lists are done and filled. then when onfinishedpainting is True i would just switch the form.visible to true. Why o why doesnt this exist? anyone know of a way to make something like this happen (i thought the forms.repaint cmd was supposed to work somewhat like this but it doesnt).

  5. #5
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    What about having it open on an onopen() >set visability to false, then run onload() set visability to true?

    surely, onload() if for when the data is populated into the form?

    Maybe this would work??? More ideas, Just a thought;

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  6. #6
    Join Date
    May 2006
    Posts
    4
    what will happen is that when onload occurs and you make the form visible, the controls will still be populating. i figured out that form.repaint does what i want (forces all controls to be finished and populated before more code is run). however, it wont do it if the form is hidden or completely covered by a popup cover form. you have to move the cover form just off the populating form so that just a sliver of a control is visible, then the rest will fill in. when the .repaint is finished i docmd close the cover form. weird that it works that way.

Posting Permissions

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