Louise has attended:
Access VBA course
Access - VBA
How do you use VBA that will
When you click a button it will open another form and close the form you currently have open?
RE: Access - VBA
Louise
Lets say you have a Button called cmdOpenSalesForm on the form called frmProductForm. When you click this button you close the Product form and open the Sales form (frmSalesForm).
The code will be
Private Sub cmdOpenSalesForm_Click()
Unload Me
frmSalesForm.Show
End Sub
Regards
Carlos
RE: Access - VBA
Thank you for your reply. I tried it and it didn't work however after trying a couple of options I have it working by using the following:
Private Sub cmdOpenSalesForm_Click()
DoCmd.Close
DoCmd.OpenForm "frmSalesForm"
End Sub
Many thanks
Louise