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

Subform Holds on to Previous data the next time it is opened.

Status
Not open for further replies.

SDS100UK

MIS
Jul 15, 2001
185
GB
Hi,

Access XP.

I have a form with a txtbox and button on. In the txtbox goes a membership number. The button opens another form an order form with certain information alreday filled in about the customer. I have a subform on this order form for the number of tickets the customer bought.

When i close the order form and then reopen it by clicking the button, I find that the number of tickets from the previous transaction is still there - but actually doesnt get written back to the table. If I change the number of tickets (on the second instance) it ends up putting that number of tickets on the FIRST order!

I am so confused - and I hope that I havent confused you! Anyone ANY idea whats going on and more importantly - how to fix it?

Many many thanks in advance

Steven
 
In the onclose, or onunload of the subform, i would put a docmd.save. Is your form property set to single or continuous? If it is single, you might need a save button or that code to tell it to save to the current record. Then you want to make sure that when the form reopens that you arent still editing that record.

In the subform's onload, onopen, or one of those, I would put a goto record acnew. This will ensure that your arent on the previous record.



misscrf

Management is doing things right, leadership is doing the right things
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top