L
lannalee
Hello,
How do I set a command button to open a new form and close the original form?
Here is the visual basic code that I am using to open the new form:
---------------------------------------
Private Sub Next_Degrees_Click()
On Error GoTo Err_Next_Degrees_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form: Degrees/Education"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Next_Degrees_Click:
Exit Sub
Err_Next_Degrees_Click:
MsgBox Err.Description
Resume Exit_Next_Degrees_Click
End Sub
----------------------------------------
This is working like I need it to, except that I need the previous/original
form (Form: Personal Bigraphical) to close after the new form (Form:
Degrees/Education) is opened.
I am sure there must be a way to do it!
How do I set a command button to open a new form and close the original form?
Here is the visual basic code that I am using to open the new form:
---------------------------------------
Private Sub Next_Degrees_Click()
On Error GoTo Err_Next_Degrees_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form: Degrees/Education"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Next_Degrees_Click:
Exit Sub
Err_Next_Degrees_Click:
MsgBox Err.Description
Resume Exit_Next_Degrees_Click
End Sub
----------------------------------------
This is working like I need it to, except that I need the previous/original
form (Form: Personal Bigraphical) to close after the new form (Form:
Degrees/Education) is opened.
I am sure there must be a way to do it!