This is a good case for using a global variable. You do this by adding a Public variable of type Long to a module (.bas). You'd increment it every time you needed a new document number. This is easy to do, but not that safe.
A good balance between ease of coding and safety is using a Private variable in your module, then writing a function to increment the value and return you the new value:
[tt]
Private m_NewDocNum as Long
Public Function GetNewDocNum() as Long
[tab]m_NewDocNum = m_NewDocNum + 1
[tab]GetNewDocNum = m_NewDocNum
End Function
[/tt]
If you want to get fancy, you'd use a class and the Singleton design pattern.
Chip H.