|
-
Apr 9th, 2003, 02:08 AM
#1
Thread Starter
New Member
report txtBox.controlSource
Hi to all!
I have a problem with text boxex in an Access report. I have the following situation:
I fill the textfields in a form with data maintained in a revordSet variable from an query SQL, through an ADODB connection. In the form that I have theese text boxes I have a button that open an report. In this report I want to show a part (some fields) from recordSet variable (that is made public in my form). Is no way to set controlSource from my report to a value from recordSet (the only result is an dialog window that asks me an parameter when i click the button for report). I've tried to make the recordsource the SQL string that fills recordSet object with data but no result.
there it is my code from report on Open event:
Option Compare Database
Option Explicit
Public rapNewRes As Recordset
Public rapSql As String
Private Sub Report_Open(Cancel As Integer)
Dim varRap As String
varRap = "test"
rapSql = Form_persoane.mySQL
Set rapNewRes = Form_persoane.newRes
MsgBox "sql din forma_______" & rapSql
MsgBox "in raport \\\\\\\\\\\\\\\\\\" & rapNewRes.RecordCount
Me.RecordSource = rapSql
Report_rap_test2.RecordSource = rapSql
'Report_rap_test2.rNumeP.ControlSource = [tables]![persoane]![numeP]
'MsgBox "^^^^^^^^^^^^^^^ " & Report_rap_test2.rNumeP.ControlSource
MsgBox varRap
Report_rap_test2.rNumeP.ControlSource = varRap
'Report_rap_test.rNumeP.Value = rapNewRes!numeP
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|