A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

using formulas in text fields



 
 
Thread Tools Display Modes
  #1  
Old December 14th, 2006, 08:37 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 18
Default using formulas in text fields

Hi,

I have a large text field from which I'd like to display only the last
5 characters. I thought the way to do this would be to set the
control source to this:

=Right$([f5],5)

but it's giving me #Error. If I just set it to [f5] then the full
text displays so the source is good but evidently I'm phrasing it
wrong. Could someone tell me what the correct syntax is?

Thank You
  #2  
Old December 14th, 2006, 08:40 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 18
Default using formulas in text fields

My bad. This is actually not a text field but a memo field. Can one
not use text methods on memo fields?
  #3  
Old December 14th, 2006, 09:04 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default using formulas in text fields

Does the field always have a value? If it's ever Null, then Right$ will
fail: use Right instead.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


wrote in message
news
Hi,

I have a large text field from which I'd like to display only the last
5 characters. I thought the way to do this would be to set the
control source to this:

=Right$([f5],5)

but it's giving me #Error. If I just set it to [f5] then the full
text displays so the source is good but evidently I'm phrasing it
wrong. Could someone tell me what the correct syntax is?

Thank You



  #4  
Old December 14th, 2006, 09:16 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 18
Default using formulas in text fields

I tried that one, same thingr. I know that there is something in this
field though. Something about the way I'm phrasing it must be wrong

I've tried it like this:
=[Right([f5],5)]

and this
=Right([f5],5)

and this
=Right(f5,5)

always yields #Error


On Thu, 14 Dec 2006 15:04:57 -0500, "Douglas J. Steele"
wrote:

Does the field always have a value? If it's ever Null, then Right$ will
fail: use Right instead.

  #6  
Old December 14th, 2006, 11:47 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 18
Default using formulas in text fields

On Thu, 14 Dec 2006 13:28:35 -0800, fredg
wrote:

This was the problem thanks.


Make sure the name of the control is NOT f5

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.