Results 1 to 5 of 5

Thread: after form load

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Mty, Mexico
    Posts
    1

    Question


    Is there a way to make a procedure just when the form is loaded, something like after_form_load()....????

    I use a MSRDC with a MSFlexGrid, and in the form load, the MSRDC connect to the DB, but I can't retrive the data in the grid, some how it don't refresh, so I want to do it just when the form load finished.

    Thank you

    _____________________________
    Juan Martinez
    [email protected]

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276

    hmmm

    have you tried Form_Activate()

    it might work...

  3. #3
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    I think he wants to execute some code when the form is loaded, but not actually IN the Form_Load event...

  4. #4
    Guest

    Form_Load

    I've had the same problem, and here's what I did:

    Code:
    Private Sub Form_Load()
      ' .. Regular form_load stuff ..
      Call initDatabase
      ' .. Other code that needs to "see" the database ...
    End Sub
    
    Private Sub initDatabase()
      datMyDataSource.Refresh
      grdMyGrid.Refresh
    End Sub
    When form_load gives control to initDatabase, the sub forces the data source to load and open the connection before it otherwise would (at the end of form_load).

    John

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    same old

    I had a problem a little similar..using a db I went from form to form and of course the load wouldn't work..so I just built a public sub to do my stuff and called if from form activate.

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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