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

Undo creation of new record in subform from mainform 1

Status
Not open for further replies.

Kalin

Programmer
Jul 24, 2001
76
NL
made a button on a mainform which has to cancel a newly made record on a subform. Problem is focus to subform is lost and thus undo doesn't work.

By the way, after undoing the focus has to be set to an empty new record.
 
I haven't checked this, but I think that subform_name.undo should work.
As you had to be at an empty new record to undo the changes, you should be lkeft with the emopty record again.
hope this helps,
Graham
 
hi there:

try this one out:

Dim rcs_a As Recordset
Set rcs_a = Me!Child0.Form.RecordsetClone
rcs_a.MoveLast
rcs_a.Delete
Me!Child0.Form.Requery
Me!Child0.Form!Text0.SetFocus
'' then in the gotfocus you can go to a new record...

grtz

CPU-burn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top