Script crashes my machine

  • Thread starter Thread starter Bob
  • Start date Start date
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
 
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.
 
Back
Top