In my Form of Access 2010, I have bound textboxes named; Current Reference (Text), Date, Amount (Currency), Rev 0 Reference (Text), Rev 0 Date (Date), Rev 0 Amount (Currency), Rev 1 Reference, Rev 1 Date, Rev 1 Amount, Rev 2 Reference, Rev 2 Date, Rev 2 Amount, Rev 3 Reference, Rev 3 Date, Rev 3 Amount, Rev 4 Reference, Rev 4 Date, Rev 4 Amount.
I also have unbounded option buttons named; R0, R1, R2, R3 & R4 with After Update code which written like the following:
__________________________________________________ ____________
Private Sub Option R0_AfterUpdate()
Me. Rev 0 Reference = Me. Current Reference
Me. Rev 0 Date = Me. Date
Me. Rev 0 Amount = Me. Amount
End Sub
__________________________________________________ ____________
Private Sub OptionR1_AfterUpdate()
Me. Rev 1 Reference = Me. Current Reference
Me. Rev 1 Date = Me. Date
Me. Rev 1 Amount = Me. Amount
End Sub
__________________________________________________ ____________
Private Sub OptionR2_AfterUpdate()
Me. Rev 2 Reference = Me. Current Reference
Me. Rev 2 Date = Me. Date
Me. Rev 2 Amount = Me. Amount
End Sub
__________________________________________________ ____________
ETC., ETC.,
The idea is if I click on 1 of the option buttons, the data from Current Reference, Date, and Amount will be copied to the respective textboxes so that I do not need to type again the same data. While in my report, only the Current Reference, Date, Amount will be shown and the rest are just for recording purposes. This has been achieved successfully.
The problems are:-
1. Once I move to next record, the option button which earlier was selected, remain selected. In a case where I need to click on the same button for the current record, the details have been ‘overwrite’ or removed.
Question: What are the other solutions I could try to make the option button remain unchecked/not selected?
2. I tried to copy the record to be pasted on a new fresh record. But Microsoft Visual Basic message pop-up showing “Run-time error ‘-2147352567 (80020009)’: Update or CancelUpdate without AddNew or Edit”.
Question: How to rectify this error?
Thank you.