How to reset an option button on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Inadvertantly click one of the options in an option group when I did not want
any option selected. Is there a way to clear the option group back to its
original state?

Is there a way to reset the ID that automatically increases with each new
record. I have compacted a database by erasing unneeded records and each new
record continues automatically increasing the original ID
 
Boyd said:
Inadvertantly click one of the options in an option group when I did not
want
any option selected. Is there a way to clear the option group back to its
original state?

If you are still on the record, you can hit the Escape key and all the
changes will be reversed. Otherwise, if the record has a default, just
select that. If there is no default, you'll either need an Update query, or
you'll need to directly edit the table.
Is there a way to reset the ID that automatically increases with each new
record. I have compacted a database by erasing unneeded records and each
new
record continues automatically increasing the original ID

Since Access 2000, the behavior of the autonumber is not to reset to the
highest value in the table + 1. Now, the only way you can do it is to
duplicate the table, remove all the records, compact the database, then
append all the records to the new table. Of course you'll need to rebuild
all the relationships to the new table. The autonumber should not be used
for meaningful data, rather, use it as a key only (which is its true
purpose).
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
Arvin Meyer said:
If you are still on the record, you can hit the Escape key and all the
changes will be reversed. Otherwise, if the record has a default, just
select that. If there is no default, you'll either need an Update query,
or you'll need to directly edit the table.


Since Access 2000, the behavior of the autonumber is not to reset to the
highest value in the table + 1. Now, the only way you can do it is to
duplicate the table, remove all the records, compact the database, then
append all the records to the new table. Of course you'll need to rebuild
all the relationships to the new table. The autonumber should not be used
for meaningful data, rather, use it as a key only (which is its true
purpose).
--

and

If you need some sort of auto-increase number, create a new field, Number,
Long Integer, Indexed No duplicates.

Populate existing records manually or by Update Query and
On the form's property sheet set the Default Value to:

Nz(DMax("[YrNewField]","[YrTable]"),0)+1

Set Enabled to False (No)

This will work OK if you are in a single user environment

Regards/JK
 

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

Back
Top