Now Compact & Repair now working properly
Dear Bob Sir,
I created a Module as under:
Public Sub CompactData()
DoCmd.Close acForm, "frmMainMenu", acSaveNo
SendKeys "%(TDC)", False
End Sub
In the OnClick event of Command button I put this
CompactData
It was working fine earlier. When I clicked the button, the DB closed and reopened with the usual security warning. As I wanted to show this feature to a new user, when I clicked the button, the DB closed and nothing happened. I had to open the DB from the Desktop shortcut. What could have caused this error? Could you please explain?