Wrong record being updated

G

Guest

In Access 2000.
I have a table with three records. Some of the fields are RMAKey, RMANo,
SerialNo. and Shop order No.

WHen I open the form I get a listbox listing these fields in RMANo order.
The RMAKey is hidden. It is the key to the table (Indexed, No duplicates).
I can click on any of the entries and get a new screen with the details for
the RMA.

If I click on the RMANo = 2 or RMANo = 3(Not RMANo = 1), I get the correct
detail screen. But when I click on "Return No Save" a menu I created, the
code goes to the correct function which has the following like of code

DoCmd.Close acForm, "frmWarrantyServiceWorksheet", acSaveNo

which closes the detail sheet.

Originally the listbox had
RMANO SerialNo ShopOrderNo
1 12 13
2 22 23
3 32 33

If I originally clicked on RMANo=2, upon return I get
RMANO SerialNo ShopOrderNo
2 12 13
2 22 23
3 32 33

If I originally clicked on RMANo=3, upon return I get
RMANO SerialNo ShopOrderNo
3 12 13
2 22 23
3 32 33

The table also reflects this change.

Does any have any idea what is happenning? Any suggestions would be
appreciated.

Thanks

Shell
 
D

Douglas J. Steele

The acSaveNo parameter does not prevent the data from being updated. What it
does is prevent any design changes that may have been made to the form from
being saved. The data is automatically saved when focus moves from the row.
If you want to prevent that, you have to put logic in the form's
BeforeUpdate event to cancel the update.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top