hi guys im making a button which is print im still learning on how to do or use crystal report in vb6 to print a specific record based on what the user will input on the textbox or flexgrid anyone can help me on this?im eager to learn about this.i already set up the fields on the report the problem i cant display the specific records that the user will input on the texbox..for example the user will input the id no:123456 in the textbox and shows the records in all the textboxes or flexgrid after that the user will hit the print button to print those information..the question is how can i print or get the necessary information on the report..?im hoping for your answers thanks androidz

Edited 5 Years Ago by androidz: n/a

i use this code under the print command button to get the value of the text box and print it on the report

Private Sub cmdprint_Click()
  Form2.Show
  Me.Hide
  
crxreport.FormulaFields.Item(1).Text = Chr(34) & txtold_idno.Text & Chr(34)
crxreport.FormulaFields.Item(1).Text = Chr(34) & txtold_cat.Text & Chr(34)

but it shows me error object variable or with block variable not set.whats that mean?
i use a formula for my id and cat..

with block variable not set

will probably refer to the cr report control that is not referenced. You need to set its datasource first before you can make a call to it.:)

This article has been dead for over six months. Start a new discussion instead.