X
xg
My code moves the form to the left but cannot return to its original
location. where did I do wrong? here is my code:
Private Sub cmdStudRec_Click()
On Error GoTo Err_cmdStudRec_Click
Dim stDocName As String
Dim leftloc As Integer
leftloc = Forms(0).WindowLeft
Forms(0).Move Left:=6500
stDocName = "StudentRecords"
DoCmd.OpenReport stDocName, acPreview
Forms(0).Move Left:=leftloc
Exit_cmdStudRec_Click:
Exit Sub
Err_cmdStudRec_Click:
If Err = 2501 Then
Else
MsgBox Err.Description
End If
Resume Exit_cmdStudRec_Click
End Sub
location. where did I do wrong? here is my code:
Private Sub cmdStudRec_Click()
On Error GoTo Err_cmdStudRec_Click
Dim stDocName As String
Dim leftloc As Integer
leftloc = Forms(0).WindowLeft
Forms(0).Move Left:=6500
stDocName = "StudentRecords"
DoCmd.OpenReport stDocName, acPreview
Forms(0).Move Left:=leftloc
Exit_cmdStudRec_Click:
Exit Sub
Err_cmdStudRec_Click:
If Err = 2501 Then
Else
MsgBox Err.Description
End If
Resume Exit_cmdStudRec_Click
End Sub