Im trying to make one button in a form open a new table and close the current one. Is there any easy way to do this? This is my first attempt at making an access database and I dont know visual basic Thanks for any help.
Attach this code to the button:<br><br>Private Sub btn_OpenNewForm_Click()<br>Dim linkCriteria As String<br><br> DoCmd.Close<br> DoCmd.OpenForm yourformname, , , linkCriteria<br><br>End Sub<br><br>The first DoCmd closes your current form and the second one opens the form you name in the 'yourformname' variable.<br><br>shar<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.