How to make first letter of textbox appear only 
Author Message
 How to make first letter of textbox appear only

How do I get a textbox to return the first letter only?

Also, I want to combine data in a single text box.  For example,

Textbox1 = Daywear
Textbox2 = Package

Textbox3 = D: Package

Textbox 3 equals the first letter of textbox1 and a colon and the full text of
textbox2.

Thanks,

Doyle60



Fri, 27 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only
In VBA:

Left$(Me!Textbox1, 1) & "; " & Me!Textbox2

Quote:

>How do I get a textbox to return the first letter only?

>Also, I want to combine data in a single text box.  For example,

>Textbox1 = Daywear
>Textbox2 = Package

>Textbox3 = D: Package

>Textbox 3 equals the first letter of textbox1 and a colon and the full text
of
>textbox2.



Fri, 27 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only
Thanks.
I used Left in excel but couldn't figure it out here.
I will give it a try.

Thanks again,

Doyle60



Fri, 27 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only
Or as the control source for the control

=Left([Textbox1],1) & "; " & [Textbox2]

(Note: Left not Left$)

Quote:

>In VBA:

>Left$(Me!Textbox1, 1) & "; " & Me!Textbox2


>>How do I get a textbox to return the first letter only?

>>Also, I want to combine data in a single text box.  For example,

>>Textbox1 = Daywear
>>Textbox2 = Package

>>Textbox3 = D: Package

>>Textbox 3 equals the first letter of textbox1 and a colon and the full
text
>of
>>textbox2.



Fri, 27 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only
I got it to work with Left$ (not Left) with references to text boxes (not field
names).  Someone got it backwards, I think.

This works:

=Left$([txtCategory1],1) & ": " & [txtGroup1]

Thanks all,

Doyle60



Fri, 27 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only

Quote:

>Or as the control source for the control

>=Left([Textbox1],1) & "; " & [Textbox2]

>(Note: Left not Left$)

Left returns a Variant datatype, Left$ returns a String Data Type.
I stand by my code :)

Steve



Mon, 30 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only
Precisely, which is why if you used your code as the controlsource directly
it wouldn't work because if one of the controls is Null then you will get
#error as the result, as you are trying to assign a null to a string, with
Left this doesn't happen.

Your solution is correct in code, I'm not disputing that, I'm saying that my
solution works _as_ the control source.

So "Stand by your code" (is that a song or something <g>) but please try
reading my posting a bit more carefully before jumping in.

Quote:


>>Or as the control source for the control

>>=Left([Textbox1],1) & "; " & [Textbox2]

>>(Note: Left not Left$)

>Left returns a Variant datatype, Left$ returns a String Data Type.
>I stand by my code :)

>Steve



Mon, 30 Apr 2001 03:00:00 GMT  
 How to make first letter of textbox appear only

Quote:
>Your solution is correct in code, I'm not disputing that, I'm saying that my
>solution works _as_ the control source.

Well, even in code Left$() will raise error 94 if its first argument
is Null. I think Left is better all around if that can happen.


Mon, 30 Apr 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. making first letter a capital

2. Searching for records on only first three letters - Repost

3. How to make the first letters uppercase ?

4. Capitalizing The First Letter Of Each Word

5. Heading to show first letter of surnames on page

6. Masked Edit COM control appears only on first tab page of tab control in VB.NET

7. ASP- select records from a database according to the first letter in one of the fields

8. Changing only the first letter in a file name

9. Capitalising first letter of an input

10. Capitalizing The First Letter In Each Word

11. Missing first letter while SendKeys

12. sorted drop down list does not move by first letters

 

 
Powered by phpBB® Forum Software