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

Problem with Startswith function

Status
Not open for further replies.

UnleashThePain

Programmer
Oct 23, 2006
16
NL
Hi,

I am having difficulties with the following formula:

If {?Report} startswith 'DAG' and {SKU.SUSR8} = 'Y' then '1'
I receive the error "A string is required here."

It does'nt work. The original formula is:
If {?Report} = 'DAG' and {SKU.SUSR8} = 'Y' then '1'

That formula works out well, but I would like to make the selection showing the records starting with DAG. I also tryed the several other formula's which did'nt worked out well:

If {?Report} like 'DAG%' and {SKU.SUSR8} = 'Y' then '1'

I receive the error "A string is required here."

Can anyone help, it would be appreciated.

Rob



-----------------------------------------
>>>Fornicate Under Command of the King<<<
 
How about
if (mid(uppercase{?report},1,3)="DAG"

is the ?report field a parmater field or a real field in your database?
usualy fields that begin with ? are parm field. so I don't see what it is matching with in your database.
Jill
 
Where is your cursor when you get the error message? This doesn't look like a record selection formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top