Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with a report problem

Status
Not open for further replies.

linuxjr

Programmer
Jun 2, 2001
135
0
0
US
I am now making reports and no problem well I have a form where I do data entry but also have searchs and navigation of records. Anyway Say I want a particular record so click on search type a number and returns 6 records filtered. Then I click on add it will be the same number and the date automatically entered I will enter the values and then click on print. Well When I do that and heres the code:

Private Sub CmdPrintInspection_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToControl "prnt_dat"
Prnt_dat.Value = Date
DoCmd.GoToControl "prnt_log"
Prnt_log.Value = Time()


On Error GoTo Err_cmdPrintInspection_Click

Dim stDocName As String

stDocName = "RptInspection"
DoCmd.OpenReport stDocName, acPreview

Exit_cmdPrintInspection_Click:
Exit Sub

Err_cmdPrintInspection_Click:
MsgBox Err.Description
Resume Exit_cmdPrintInspection_Click
End Sub

Now it throws an error message saying 2486 can't do this now. I know the error means something else is happening at the same time as I try to print. But I don't know what its causing and didn't know if anyone had any suggestions. I did notice that if I didn't filter the records it will print fine but if I filter it won't. Don't know if that helps much but any suggestions or tips be appreciated.
 
Hi.

I know that your post was old...

Were you using access 2000, and did it only crash on lines
that contained a Docmd. ??

gzep
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top