Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / April 2008

Tip: Looking for answers? Try searching our database.

Unbound Control Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
luis_a_roman - 09 Apr 2008 04:35 GMT
I have a report that needs to print a detail line from an unbound control in
the detail line. I read a databae to populate this unbound control. However,
the problems that I'm having is that the vba code works correct meaning that
it retrieves the information but the report (unbound control) does not show
the information when the report print.

Can someone give me guidance to enable me to print the detail line instead of
not printing anything.

Thank you for guidance.

Luis

CODE:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Call F35detailPoc(unboundF35Line)
Me.POC = unboundF35Line
End Sub

Function F35detailPoc(unboundF35Line)
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim strRead As String

strRead = "SELECT [tblAwardFeeF-35contact].[F-35Contact] " _
  & "FROM [tblAwardFeeF-35contact]" _
  & "WHERE ((([tblAwardFeeF-35contact].Period)=" & Me.Period & ")" & " AND (
([tblAwardFeeF-35contact].Phase)=" & "'" & Me.Phase & "')" & " AND ((
[tblAwardFeeF-35contact].EvaluationArea)=" & "'" & Me.EvaluationArea & "')" &
" AND (([tblAwardFeeF-35contact].[Item No])=" & Me.Item_No & "))"

Set dbs = CurrentDb()
Set rs = CurrentDb.OpenRecordset(strRead)
       With rs
               Do Until rs.EOF
                   Debug.Print "rs field = " & rs![F-35Contact] &
unboundF35Line
                   unboundF35Line = unboundF35Line + rs![F-35Contact] &
vbNewLine
                  .MoveNext
               Loop
              'Debug.Print "emailstring - 1= " & emailstrng
       End With

Set rs = Nothing
End Function
Evi - 09 Apr 2008 22:30 GMT
Lets say your Unbound control in the form is named txt1 and it is in a form
called MyForm

In the textbox in the report type
=Forms![MyForm].Form.[txt1]

So long as your button is in MyForm, the report's text box will show
whatever you typed into txt1
Evi

> I have a report that needs to print a detail line from an unbound control in
> the detail line. I read a databae to populate this unbound control. However,
[quoted text clipped - 46 lines]
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200804/1
luis_a_roman - 10 Apr 2008 03:06 GMT
Evi - Thank you for the feedback. Your feedback help me solve the problem.

Luis

>Lets say your Unbound control in the form is named txt1 and it is in a form
>called MyForm
[quoted text clipped - 11 lines]
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/Forums.aspx/access-reports/200804/1
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.