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

Requery Updating Dirty Record

Status
Not open for further replies.

ben1234zz

MIS
May 12, 2008
71
GB
Hi

We have a form that opens another form. The other form runs a stored procedure against the back-end SQL Server then closes, when it closes it requeries the original form.

The SP amends the record open in the main form.

Unforunately during the requery appears to write the dirty data in the main form back to the database (undoing the SP).

How can I do a re-query without writing the data back to the DB?

Thanks
B
 
Why are you requerying the the original form?

(RG for short) aka Allan Bunch MS Access MVP acXP ac07 winXP Pro
Please respond to this forum so all may benefit
 
Hi, Thank you for your post.

Because the SP has updated the data shown in the original form.

Thanks
B
 
Well, that's what it's doing! When you requery a form a dirty record is saved. The only thing I can see is that you have to dump the new data before requerying the original form.

Why exactly do you not want the dirty record saved?

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
A Requery is not necessary. Just a Refresh should update the current records in your form.

(RG for short) aka Allan Bunch MS Access MVP acXP ac07 winXP Pro
Please respond to this forum so all may benefit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top