Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bypassing the form_activate

Status
Not open for further replies.

rene316

Programmer
Jan 14, 2002
81
US
Hello,
I want to know if there is a way to bypass the form_activate when returning from a called form. I know it fires only once when you first start the program, however if you call another form and it looses focus, when you exit the called form, it fires again. Is there a way to keep that from happening. I have a form that is used to find a record, when it finds the record it moves the main form to that record. But, in the main form_activate I have this code to help get my record number to work:

private sub form_activate()

with adodc1.recordset
.movelast
lTotalRecords = .recordcount
.movefirst
end with

end sub

From my understanding I need to do this because Jet has to touch all the records to work correctly, as far as using the adodc1.recordset.absoluteposition, otherwise it will never update. So once again, is there a way to bypass the form_activate when returning from a called form.

thx,
Rene
 
In the form declarations add
DIM ib_Bypass as boolean

private sub form_activate()

if ib_Bypass then exit sub
with adodc1.recordset
.movelast
lTotalRecords = .recordcount
.movefirst
end with
ib_Bypass = true

end sub


cjw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top