mixing integer and text in a text box 
Author Message
 mixing integer and text in a text box

I am trying to place two fields from a query into a text
box on a report. One is an integer and one text, the
report will recognise them both separately but not
together. I am using

=[Section] & ". " & [SectionTitle]

and would like the result to look like

1. Section Revision list

Can any one suggest where I am going wrong.

Neil



Tue, 21 Sep 2004 18:07:34 GMT  
 mixing integer and text in a text box
Neil:

1.) Beware of using a fields with names like [Section], because in reports,
there are properties called Section and Access can get confused; Alias the
field in your query to something like BookSection: Section.

2.) In your control, convert the integer to a string first using CStr()
function so that the control source would look like:

=CStr([BookSection]) & ". " & [SectionTitle]

HTH
--
Steve Arbaugh
MS Access MVP
ATTAC Consulting Group
http://ourworld.compuserve.com/homepages/attac-cg


Quote:
> I am trying to place two fields from a query into a text
> box on a report. One is an integer and one text, the
> report will recognise them both separately but not
> together. I am using

> =[Section] & ". " & [SectionTitle]

> and would like the result to look like

> 1. Section Revision list

> Can any one suggest where I am going wrong.

> Neil



Tue, 21 Sep 2004 20:51:15 GMT  
 mixing integer and text in a text box
=ltrim(str([Section])) & ". " & [SectionTitle]

ltrim is just to eliminate leading spaces if any



Tue, 21 Sep 2004 21:28:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Copy text from Text box to text box

2. Make a text box visible if a different text box has text in it

3. Text Boxes: Control text in a text box

4. Text Boxes: Controlling text in a text box

5. How do I wrap text in a text box around another text box

6. text boxes as integers?

7. Access 2000, data mixed in text box??

8. 'Mix Data in a text box

9. Formatting numbers and dates in mixed content text boxes

10. Update text boxes on a form based on another text box entry


 
Powered by phpBB® Forum Software © phpBB Group