Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal XI VB6 pass a string into a textbox

Status
Not open for further replies.

mgason

Technical User
Feb 6, 2003
158
AU
Hi,
pass a string of text into Crystal from a textbox in VB and display it, sounds easy!
I have tried a couple of things I found here and elsewhere involving both formulas and parameters. I could not get any to work.
Could some one please tell me how to go about this step by step, BOTH in VB6 and CrystalXI.

I have wasted most of a day already.

I tried making a formula field called Code, formula was simply "@Code", added it to my report.
RecipeText.Text is the name of my textbiox in VB

Then in VB I tried
report1.FormulaFields.GetItemByName("Code").Text = "RecipeText.Text"
and several syntax variations

also tried a few variations on this
report1.FormulaFields(0) = "Code = '" & RecipeText.Text & "'"

No luck
mark
 
in case anyone else needs to know this was the answer

report1.FormulaFields.GetItemByName("test").Text = "'" & RecipeText.Text & "'"

where test is the name of my formula in CrystalXI
and RecipeText was the name of my text input box in VB
To be clear RecipeText.text is surrounded by double quotes, then single quotes, then double again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top