Re: report prints blank fields



Joanne,
Not sure if I understand but...
Are you saying that you have 4 "unbound" combo boxes on a form, and you want a report
to display/print those 4 values?

Any "bound" fields on the form can be accessed by the report through the query behind
it.
But unbound combos values will need to be directly referred to...

Leaving the form open while the report is called... an unbound text control with a
ControlSource of...
= Forms!frmYourCallingFormName!cboYourComboName
would display the value presently selected in cboYourComboName of the form.
Same for the other 3 combos.

--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

"Joanne" <jobobbuss@xxxxxxxxxxxxx> wrote in message
news:OboJPT93GHA.324@xxxxxxxxxxxxxxxxxxxxxxx
I am trying to print out the current record that is in my form, but
all that prints is a blank form. I have tried to do this using both
of the following coding snippets - same blank form result for both.

Private Sub cmdPrintPhoneOrder_Click()
DoCmd.OpenReport "rptPhoneOrders", , , "[CoNameID] = " & Me!CoNameID
End Sub

Private Sub cmdPrintPhoneOrder_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "rptPhoneOrders"
strWhere = "[CoNameID]=" & Me!CoNameID
DoCmd.OpenReport strDocName, acNormal, , strWhere
End Sub

This form is based on 4 simple tables to get the info into the
cboboxes. Once there, I want to print it, dump the info, and do the
next one. That's all the app is needed for, but I am wondering if
since I am not writing the fields to a table if this is why the report
is always empty?
If that is the case, how do I write the info to some holding table
without messing with the rowsource information that fills my cboboxes?

The record can be dumped after print, so the holding table will only
ever have one record in it at a time, which I'm thinking will solve
the problem of printing only the current record.

Thanks for any help you can give me - I appreceiate your efforts.

Joanne


.



Relevant Pages

  • RE: Reporting DB property info using dbs.Containers
    ... the code should be contained in the On Format event of the report section. ... Dim dbs As DAO.Database ... the value and stuff it into an unbound field CategoryName- ... Private Sub Form_Open ...
    (microsoft.public.access.reports)
  • SQL in Report
    ... my report, the report looks at a field in the select query ... Private Sub Report_Open ... 'Supposed to put an X in unbound Text Box named "AM". ... QAM", "2 QAM" and "3 QAM" values need an X for the return. ...
    (microsoft.public.access.queries)
  • Variables wont print to printer
    ... How can I get variables passed to a report from a form to print on my printer? ... The unbound text box is named "txtCustomer" that's in the Report Header ... Private Sub ReportHeader_Format ...
    (microsoft.public.access.formscoding)
  • Re: Search Filter for Report
    ... Limiting a Report to a Date Range ... That example applies the filter string to a form, ... unbound text box. ... Private Sub cmdCreateReport_Click ...
    (microsoft.public.access.formscoding)
  • Re: Error: Microsoft jet database engine does not recognize " as a va
    ... If you are attempting to create a crosstab report with dynamic columns, ... > Dim rstReport As DAO.Recordset ... > Dim intX As Integer ... > Private Sub Detail_Format ...
    (microsoft.public.access.reports)