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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.GotoRecord doesn't work for subform after changing mainform rec.

Status
Not open for further replies.

inso18

Technical User
Dec 30, 2006
147
IL
Hi Everyone.

I have a main form with a subform, they are bound with a common key (linked child and master fields).

After changing a record in the main form I try to execute

Code:
Call Me.sfrmSubForm.Form.GoToLastRecord
Which is:
Code:
Public Sub GoToLastRecord()
    DoCmd.GoToRecord , , acLast
End Sub
but the subform stays on the same record...

I tried to put "DoEvents" before the code, with no success.

After changing the record, when I execute this function by a command button manually, it does work...

Does anyone know how to solve this?
Much thanks,
inso18
 
I'm sorry for the trouble,

A simple me.sfrmSubform.SetFocus command solves this.


thanks, inso18


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top