Script crashes my machine

B

Bob

Any reason why this print preview keeps crashing my machine , First time I
select it , it takes about 30sec to bring up the report, then the 2nd time
"Crash"
Thanks In advance....Bob

-Private Sub Command388_Click()
On Error GoTo Err_Command12_Click

Dim stDocName As String

DoCmd.OpenReport "rptHorseSummary", acViewPreview, ,
"[HorseID]=Forms!frmHorseInfo!HorseID"



Exit_Command12_Click:
Exit Sub

Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click

End Sub








..........Jenny Vance
 
D

Douglas J. Steele

Don't know whether it'll solve your crashing problem, but it should be

"[HorseID]=" & Forms!frmHorseInfo!HorseID

if HorseID is numeric, or

"[HorseID]='" & Forms!frmHorseInfo!HorseID & "'"

if it's text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top