An error occurs if I try to open a non database and then my program close. I'd like a msgbox to instruct the user in opening a proper database.
If Not FilePathStr = "" And Not FileNameStr = "" Then
On Error GoTo NotValidBase
Set dbData = OpenDatabase(FilePathStr & "\" & FileNameStr)
MsgBox "That's not a valid database !", vbExclamation
Use the RepairDatabase command (and also a CompactDatabase) before opening the DB. That's anyway a good idea to keep the DB size small. For 100 points, I can provide sample code.
From VB documentation:
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.
What are they?
An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…