D
deb
I have a problem....I have a command button on a form
that will open a preview report. However, when I click
on it, it opens the report, but the form still stays on
top. I would like to form to go away after the report is
open. I put a docmd.close command in the button and then
it gives me an error....what am I doing wrong???
----------------------------
Option Compare Database
Private Sub talking_books_preview_Click()
On Error GoTo Err_talking_books_preview_Click
Dim stDocName As String
Me.Refresh
(this is where I try to put the docmd.close)
stDocName = "rpt-talking books-all"
DoCmd.OpenReport stDocName, acPreview, , "studentid="
& StudentID
Exit_talking_books_preview_Click:
Exit Sub
Err_talking_books_preview_Click:
MsgBox Err.Description
Resume Exit_talking_books_preview_Click
End Sub
that will open a preview report. However, when I click
on it, it opens the report, but the form still stays on
top. I would like to form to go away after the report is
open. I put a docmd.close command in the button and then
it gives me an error....what am I doing wrong???
----------------------------
Option Compare Database
Private Sub talking_books_preview_Click()
On Error GoTo Err_talking_books_preview_Click
Dim stDocName As String
Me.Refresh
(this is where I try to put the docmd.close)
stDocName = "rpt-talking books-all"
DoCmd.OpenReport stDocName, acPreview, , "studentid="
& StudentID
Exit_talking_books_preview_Click:
Exit Sub
Err_talking_books_preview_Click:
MsgBox Err.Description
Resume Exit_talking_books_preview_Click
End Sub