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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula not working in VB, but does in CR

Status
Not open for further replies.

karenmierkalns

Programmer
May 10, 2001
54
0
0
CA
My selection formula that I am testing in Crystal Reports (6) is:
ToText({Employee.EmpNo}) like "1234*"

which works great. I ended up needing to adjust the number formats under Options for this to work properly, because there was no field that I could just format in my report, as it is not actually in the report (selection formula). (It was the commas that was screwing it up).

And my selection formula in VB is:
"ToText({Employee.EmpNo}) like '" & txtEmpNo.Text & "*'"

This doesn't bring back any records, but it looks identical to the CR version of it, when I enter 1234 into the textbox I'm using.

I have removed the selection formula from CR to use this..why doesn't it work? Is it because the number formatting under Options is removed when I'm not editing the report anymore? What can I do about it?

Thanks. - Karen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top