-
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
-
hmmm
have you tried Form_Activate()
it might work...
-
I think he wants to execute some code when the form is loaded, but not actually IN the Form_Load event...
-
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
-
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.