Question : Compact a database for linked tables when it close

I have 2 files : Forms.mdb and Tables.mdb.
Tables.mdb contain the tables that are linked with Forms.mdb.
When I close Forms.mdb, I want that Tables.mdb will be compacted too.
In Access 2003, I know how compact a database when closing:

(french) : Outils -> Options -> Général -> [x]Compacter lors de la fermeture
(english) : Tools -> Options -> General -> [x]Compact when closing ???

In other words, I want that the 2 files will be compacted when I close Forms.mdb.
It is ok when I use .mde ? Or more than 1 user use the same Tables.mdb files in the same time ?
Thanks a lot !

Answer : Compact a database for linked tables when it close

It seems you have set your table such that not accept null values. The easy way out is to remove this requirement. If not possible then you need to validate all your fieds on in the form's in BeforeUpdate event using:

If Nz(Me!txFName,"")="" Then
MsgBox "You need to enter a valid value for First Name."
Cancel=True
End IF

Add a similar code for each txt box with entery required setting in the table.

Mike
Random Solutions  
 
programming4us programming4us