Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Access - VBA
vba courses london - Access - VBA
Resolved · Low Priority · Version Standard
Access - VBA
How do you use VBA that willWhen you click a button it will open another form and close the form you currently have open?
For upcoming training course dates see: Pricing & availability
RE: Access - VBA
LouiseLets 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
|
|
» Forum post: Macro recording in Excel |



Course updates

