Problem with a formula 
Author Message
 Problem with a formula

I'm trying to pass a formula into a report involving people's names.  If the
surname contains an apostrophe however, it generates a formula error.  How
can I get around this?  This is the code:

crep1.Formulas(5) = "fla5= 'Re: " & " " & mytable("FirstNames") & " " &
mytable("Surname") & "'"

Any help gratefully received.

Steve



Wed, 21 Apr 2004 16:23:21 GMT  
 Problem with a formula
Hi Stephen,

I'm not sure about this, and I don't have time to test it right now, but you
might try replacing  '  in your formula with "" as follows:

crep1.Formulas(5) = "fla5= ""Re: " & " " & mytable("FirstNames") & " " &
mytable("Surname") & """"

Regards,

John...............

Quote:

> I'm trying to pass a formula into a report involving people's names.  If the
> surname contains an apostrophe however, it generates a formula error.  How
> can I get around this?  This is the code:

> crep1.Formulas(5) = "fla5= 'Re: " & " " & mytable("FirstNames") & " " &
> mytable("Surname") & "'"

> Any help gratefully received.

> Steve



Wed, 21 Apr 2004 21:02:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with Excel Formula in VBA

2. Problem with passing formula from VB to Crystal Report

3. problem with recordselection formula

4. Problem in Selection formula, CR 4.6, VB 6.0

5. Problem with Selection formula

6. any problem on this formula editor

7. Problem with selection formula

8. Urgent ! Problem in Selection formula, CR 4.6, VB 6.0

9. Converting R&R formula to Cyrstal 8.0 formula

10. Formula in formula

11. Using formula field in selection formula

12. Using formula field in selection formula

 

 
Powered by phpBB® Forum Software