sard0nicpan
Programmer
Ok, my problem is as follows:
I am helping a colleage debug the code behind his reports. Originally, his text boxes were bound to Stored Procedures. Unfortunately, this did not provide him with the control of his data he desired. So instead we call the procedures in VBA. Fine. However, his text boxes are a single control with multiple values. If we set his textbox as follows:
as it loops thru it only overwrites the same text box. Now I know how to do it with a list box (and here's the complete code) as follows:
My friend has about 12 reports in his project, all painstakingly formatted with text boxes; so switching to listboxes is not a preferred direction for him.
When his reports were printed with the bound controls his values would look exactly as if they were from a dropDown list. I'm not all that into programming reports so I'm stumped. I guess the way his textbox looked is as if it were a textbox on a continues form--the same object(textBox1) would be assigned many values, appearing on the report as a list.
I hope I'm clear. Anybody have an idea? I'm sure it's simple, however, with reports I really don't know what I'm doing . . .
Thanks in advance,
SP
I am helping a colleage debug the code behind his reports. Originally, his text boxes were bound to Stored Procedures. Unfortunately, this did not provide him with the control of his data he desired. So instead we call the procedures in VBA. Fine. However, his text boxes are a single control with multiple values. If we set his textbox as follows:
Code:
me.myTextBox = !UserID
as it loops thru it only overwrites the same text box. Now I know how to do it with a list box (and here's the complete code) as follows:
Code:
Function PopNow()
Dim rs As New ADODB.Recordset
Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
cn.ConnectionString = "Provider=SQLOLEDB.1;" & _
"Data Source=usw4250062;Initial Catalog=MyImagio;" & _
"Integrated Security = SSPI"
cn.Open
UBID1 = InputBox("Your Entry")
Set cmd.ActiveConnection = cn
cmd.CommandType = adCmdText
cmd.CommandText = "Exec dbo.spA1 " & UBID1
Set rs = cmd.Execute
UBID1 = ""
With rs
Do Until rs.EOF
UBID1 = Str(!UBID) & ";" & UBID1
rs.MoveNext
Me.lboTest.RowSource = UBID1 ' I get a nice __
Drop list
Loop
End With
cn.Close
End Function
My friend has about 12 reports in his project, all painstakingly formatted with text boxes; so switching to listboxes is not a preferred direction for him.
When his reports were printed with the bound controls his values would look exactly as if they were from a dropDown list. I'm not all that into programming reports so I'm stumped. I guess the way his textbox looked is as if it were a textbox on a continues form--the same object(textBox1) would be assigned many values, appearing on the report as a list.
I hope I'm clear. Anybody have an idea? I'm sure it's simple, however, with reports I really don't know what I'm doing . . .
Thanks in advance,
SP