Forum Discussion
Upaliwije
Jan 08, 2024Copper Contributor
VBA Program
Hi Friends I am new to this forum and this is my first post. Please bear with me If I make a mistake . I have developed a small VBA program with two forms Main from and addProduct form . In this V...
Upaliwije
Jan 14, 2024Copper Contributor
Thanks For your reply . I get below msg when I run the code pls
" Compile Error Variable not Defined"
'Main form
Private Sub cmdProductform_Click()
On Error GoTo Err_cmdProductform_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProduct"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdProductform_Click:
Exit Sub
Err_cmdProductform_Click:
MsgBox Err.Description
Resume Exit_cmdProductform_Click
End Sub
" Compile Error Variable not Defined"
'Main form
Private Sub cmdProductform_Click()
On Error GoTo Err_cmdProductform_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProduct"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdProductform_Click:
Exit Sub
Err_cmdProductform_Click:
MsgBox Err.Description
Resume Exit_cmdProductform_Click
End Sub
Upaliwije
Jan 14, 2024Copper Contributor
Attached herewith My project file please