J
Jason M Canady
Hi all.
I am trying to write to the control source of a text control in a report
header when the user opens the report.
Here is what I have so far:
Dim strResult As String ' Stores the result of the input box
Dim strControlText As String ' Stores the string to write to the text
control
strResult = InputBox("Which Tumbler Barrel do you want to generate a field
report for?", _
"Generate Barrel Field Report") ' Asks the user for INPUT
strControlText = "Rock Polishing Database Field Worksheet - For
tumbler barrel No." _
& strResult & "." ' Sets the value of the string to write to the txt
control
' It works op to this point!
Me.txtHeader.ControlSource = strControlText ' This gives a #NAME
error
I know that I can shorten up the code a ton and do the same thing as the 4
lines above, but I was trying to find where the code was going wrong, and
the extra lines made it easier to insert a breakpoint and examine the
results.
If anyone can help I would be very appreciatave... I didn't think that this
would be difficult (silly me!)
Jasonm
I am trying to write to the control source of a text control in a report
header when the user opens the report.
Here is what I have so far:
Dim strResult As String ' Stores the result of the input box
Dim strControlText As String ' Stores the string to write to the text
control
strResult = InputBox("Which Tumbler Barrel do you want to generate a field
report for?", _
"Generate Barrel Field Report") ' Asks the user for INPUT
strControlText = "Rock Polishing Database Field Worksheet - For
tumbler barrel No." _
& strResult & "." ' Sets the value of the string to write to the txt
control
' It works op to this point!
Me.txtHeader.ControlSource = strControlText ' This gives a #NAME
error
I know that I can shorten up the code a ton and do the same thing as the 4
lines above, but I was trying to find where the code was going wrong, and
the extra lines made it easier to insert a breakpoint and examine the
results.
If anyone can help I would be very appreciatave... I didn't think that this
would be difficult (silly me!)
Jasonm