How are you doing this update and where? If you execute SQL to update
the database before you call up the second form it should happen in
sequence. The update should finish before control returns to your
program and then your code will load the form. Are you maybe doing the
update in the form's Load event?
> If you declare your connection object using WithEvents you will expose the
> events for the connection:
> This declaration must be in a form or class module:
> Private WithEvents cnn As ADODB.Connection
> When declared this way, the connection name will be in the objects combobox
> and its events will be in the events combo-box.
> The following event will fire when your query to the database has completed
> and is ready to use.
> Private Sub cnn_ExecuteComplete(ByVal RecordsAffected As Long, ByVal pError
> As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pCommand As
> ADODB.Command, ByVal pRecordset As ADODB.Recordset, ByVal pConnection As
> > Hi
> > I have a small problem with the application I am busy with.I have and
> > msflexgrid and before the form exists it saves the selected row to the DB
> > using an update statement, this db entry is used in the next form and is
> > requested using a select statement. My problem is that sometimes the
> > takes longer than the other form loading and selectinmg the Db entry
> > therefore it doesnt get selected. I need some advice on which controls to
> > use to ensure that the appropriate time is taken to let the update
> > take place and therefore the correct info selected. Should I make use of a
> > different mouse cursor? or should i make a small form with a progress bar
> > it? But what I am trying to get my head around is the following: how do I
> > know when the statement is completely updated?is there anyway of
> > from the DB when it is complete? I am using and access database and
> > ADO.Another factor is also when the db increases will it affect the
> > update/insert time??
> > thanx in advance!
> > ben