Hi pet,
Without knowing your VBA skills I've opted for the simplest solution.
In a module type this:
Code:
Dim ChkBoxArray As Variant
'The following array holds 4 values:
'ChkBoxArray(0) holds '0' if first record, '1' otherwise.
'ChkBoxArray(1,2 & 3) hold each chkbox value.
ChkBoxArray = Array(3)
In the form where the 3 checkboxes are, type this:
'This function first checks to see if this is the first
'record to be edited - if it is, then the code won't run as
'the user needs to manually enter data.
'If it isn't, it populates the checkboxes with values
'stored from the last record....
'It is called from the form <On Current> event.
Code:
sub SetChkBoxes
if(ChkBoxArray(0) = 1) then 'The array has been filled.
chkBox1 = ChkBoxArray(1)
chkBox1 = ChkBoxArray(2)
chkBox3 = ChkBoxArray(3)
endif
end sub
'This function sets values in the array every time a
'checkbox is clicked (ready for next record to use).
'It's called by each of the 3 checkboxe's <On Click>
'events...
Code:
sub SetChkArray
chkBoxArray(0) = 1
chkBoxArray(1) = chkBox1
chkBoxArray(2) = chkBox2
chkBoxArray(3) = chkBox3
end sub
In the form <On Current> event type this....
In the <On Click> event of all 3 checkboxes type this...
----------------------------------------------------
Someone else will supply a more eloquent solution, but remember that if a user goes back to a previous record, THAT record will default IT'S checkboxes also.
You could also store records in memory, bookmark a record etc. but would still have the same problem if a user goes back to a previous record.
This would involve some complexity to get around.
Regards,
Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk