Hello,
I am just starting to learn VBA (have a bit of experience in VB.net), and am having problems right off the bat. Currently, I have created a user form with a single button whose sole purpose is to close the form. The code to do this is as follows:
This is the entirety of the code so far. Now, when I click the button to close the form, I receive an error stating "Object Required" (debug points to the DoCmd.Close line). After googling the problem, every other occurrence I found had to do with something not applicable to my current problem. Does anyone have any ideas as to why this is happening?Code:Private Sub CBClose_Click() DoCmd.Close acForm, Me.Name End Sub




Reply With Quote