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!

open report based on temp. table data

Status
Not open for further replies.

cdavisdccb

Programmer
Sep 30, 2002
25
0
0
US
I am using the following procedure on a form to

- clear and refill a temporary table (temptblTree) with all sublevel parts (Toplevel = Me!ITMKEYID)
- open the report which is supposed to show this table

The problem is: When the report opens, only the first two records from the table show up. If I open the report manually, everything is fine.

Any suggestions?
thank you.

*********** code: ***********

Private Sub OpenBOM_Button_Click()
On Error GoTo ErrNoData

lngCounter = 0 'public as long

Call tblTemp_Clear 'deletes all records in temptblTree
Call BuiltMultiLevel(1, Me!ITMKEYID) 'fills sublevel parts in temptblTree

If DCount("*", "temptblTree") > 0 Then
DoCmd.OpenReport "_repBOM", acPreview
RunCommand acCmdFitToWindow
Else
MsgBox "This part contains no sublevel parts", _
vbInformation + vbOKOnly, "OK"
End If

ErrNoData:
If Err = 2501 Then Exit Sub

End Sub


"It doesn't matter how idiot-proof you make it, someone makes a better idiot!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top