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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing problem 1

Status
Not open for further replies.

timhans

Programmer
Jun 24, 2009
75
Hello, I all the sudden developed a proplem with printing, Have bound(autonumber) form which I send to a report with following code

Private Sub Command101_Click()
DoCmd.OpenReport "rptBuildSheet", , , _
"ChairBuildDetailsID = " & Me.txtChairBuildDetailsID.Value
DoCmd.GoToRecord , , acNewRec
Exit_Command101_Click:
Exit Sub

Print form but w/out Data

Any help please
 

Is ChairBuildDetailsID Text or Numeric? If Text I believe the syntax would be

Code:
"[ChairBuildDetailsID] = '" & Me.txtChairBuildDetailsID.Value & "'"

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Numeric, I reinstalled the report, checked printer setings ?, Thanks for the responce, Open to any other ideas
 
Have you tried building a query to verify that there is data matching the results you are looking for?

--

"If to err is human, then I must be some kind of human!" -Me
 
I have narrowed it down some, if it is a new record No data prints, if I scroll to old records data Dose print
 
So you're saying that you sometimes have a brand new record that is not printing, and you want that one to print?

Perhaps putting somethign like this in the event code of your print button will work (ahead of any print commands):
Code:
  RunCommand acCmdSaveRecord
  Form.Repaint

You may not need the repaint part, but the save command would at least save the record to your table for sure before printing... which should take care of it. If that alone doesn't use it, then perhaps you'll need the Requery command instead of Repaint to run.

--

"If to err is human, then I must be some kind of human!" -Me
 
SAVED, wow I was in a panic, all those sales people wanting to print there forms. I tested that code for days before I used it and then it just stopped working ?. You helped me twice today THANK YOU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top