If you want to know whether form exists in the database or not.
Here is the code-
Sub check_if_form_exits()
Dim obs As Object
Dim found As Boolean
Dim form_name_to_check As String
form_name_to_check = "sales_detail"
found = False
For Each obj In Application.CurrentProject.AllForms
If obj.Name = form_name_to_check Then
found = True
Exit For
End If
Next
If found = True Then
MsgBox "Form Found", vbInformation
Else
MsgBox "Form Not Found", vbInformation
End If
End Sub
Download Access Database
No comments:
Post a Comment