Hi there
I have a MS Access 2007 database which frequently grows to over 2Gb. I want to be warned when the file length gets to, say, 1.5Gb. I have got so far with the following code - please bear in mind that I am an absolute beginner!!! - but don't know where to put this. Do I put it in a Form, or in every form, or on the Start Up form, or where?
Also, ideally, I would like this Module to also Compact the database rather than just reminding me to do so manually.
The code so far is:
Many thanks to you all for any help you can give me.
Viv
I have a MS Access 2007 database which frequently grows to over 2Gb. I want to be warned when the file length gets to, say, 1.5Gb. I have got so far with the following code - please bear in mind that I am an absolute beginner!!! - but don't know where to put this. Do I put it in a Form, or in every form, or on the Start Up form, or where?
Also, ideally, I would like this Module to also Compact the database rather than just reminding me to do so manually.
The code so far is:
Code:
Public Sub Module_Compact() If FileLen(CurrentDb.Name) > 150000 Then Dim PrintMsgBox As Byte PrintMsgBox = MsgBox("File Size getting too big. Please Compact.", vbOKOnly + vbExclamation, "WARNING - FILE SIZE TOO BIG") End If End Sub
Viv
Comment