Here's the wording in the Help screens...
*********************
Compacting optimizes the performance of both Access databases and Access
projects. However, in an Access project, compacting does not affect database
objects — such as tables or views — that reside in the Microsoft SQL Server
database instead of in the Access project itself. Also, compacting has no
effect on autonumbering in an Access project. However, in an Access database,
if you have deleted records from the end of a table that has an AutoNumber
field, compacting the database resets the AutoNumber value; the AutoNumber
value of the next record you add will be one greater than the AutoNumber
value of the last undeleted record in the table.
Repairing an Access database In most cases, Microsoft Access detects that
an Access database is damaged when you try to open it and gives you the
option to compact it at that time. In some situations, Microsoft Access may
not detect that an Access database is damaged. If an Access database behaves
unpredictably, compact it.
******************
Basically, it's a good idea to do that routinely, and no, you won't lose
anything.