i am using the following code that i found after searching the Forum
Code:
Public Function CompactData()
SendKeys "%(TDC)", False
End Function
Code:
DoCmd.Close acForm, Me.Name, acSaveNo
CompactData
i added it to the exit button. it does close but the size of the database is not getting smaller. its stays the same and its getting bigger and bigger all the time. actually its not a databas that i have its a utilitity with many queries and vba. when i compact and repair from the menu its trims it down to 1.7 mb when i use the code it stays as it is 70 nmd. any ideas why?
Code:
Public Function CompactData()
SendKeys "%(TDC)", False
End Function
Code:
DoCmd.Close acForm, Me.Name, acSaveNo
CompactData
i added it to the exit button. it does close but the size of the database is not getting smaller. its stays the same and its getting bigger and bigger all the time. actually its not a databas that i have its a utilitity with many queries and vba. when i compact and repair from the menu its trims it down to 1.7 mb when i use the code it stays as it is 70 nmd. any ideas why?