G
Garry
I have a simple form based on a table of products. The form is opened by a
macro in Add mode. Input data on the form is Item_No, Description, & Retail
Price. There are 2 command buttons on the form – “SAVE†& “DONEâ€. cmdSave
runs a macro to move to the next record, cmdDone, closes the form and Save is
set to YES. ItemNo, Description, RetailPrice & cmsSave have the tab stop
property set to YES. cmdDone has the tabstop property set to NO. The form’s
cycle property is set to Current Record. The form is used to enter multiple
new items in the products table. Everything works, MOST OF THE TIME - &
that’s what is troublesome. Normally when I run the macro, the form opens
with the cursor “blinking†in the ItemNo field – as it should. If I have a
lot of items to enter, I usually enter them 10 or so at a time, then click
“DONE†& reopen the form to add more – like saving a word document on
occasion so you don’t loose everything if the computer decides to “belly-upâ€.
Normally all works fine, but once in awhile when I reopen the form, focus is
on the cmdDone button??? Even though the tab stop property is set to NO. It
will do this repeatedly, until I “Compact & Repair the Database†– then all
works fine again for awhile. Inconsistencies in software bother me & I want
to release this application for use by my wife who is very intimidated by
computers. Is there something I should be doing to correct this, or is there
a way in VBA to execute the “Compact & Repair Database†function??
macro in Add mode. Input data on the form is Item_No, Description, & Retail
Price. There are 2 command buttons on the form – “SAVE†& “DONEâ€. cmdSave
runs a macro to move to the next record, cmdDone, closes the form and Save is
set to YES. ItemNo, Description, RetailPrice & cmsSave have the tab stop
property set to YES. cmdDone has the tabstop property set to NO. The form’s
cycle property is set to Current Record. The form is used to enter multiple
new items in the products table. Everything works, MOST OF THE TIME - &
that’s what is troublesome. Normally when I run the macro, the form opens
with the cursor “blinking†in the ItemNo field – as it should. If I have a
lot of items to enter, I usually enter them 10 or so at a time, then click
“DONE†& reopen the form to add more – like saving a word document on
occasion so you don’t loose everything if the computer decides to “belly-upâ€.
Normally all works fine, but once in awhile when I reopen the form, focus is
on the cmdDone button??? Even though the tab stop property is set to NO. It
will do this repeatedly, until I “Compact & Repair the Database†– then all
works fine again for awhile. Inconsistencies in software bother me & I want
to release this application for use by my wife who is very intimidated by
computers. Is there something I should be doing to correct this, or is there
a way in VBA to execute the “Compact & Repair Database†function??