UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> Indent 2nd Line In Can Grow Field, Access 2007    
 
   
bookkeeper1142
post Yesterday, 10:27 PM
Post#21



Posts: 11
Joined: 26-November 13



Thank both of you for taking the time to give me ideas & samples... that cosmetic effect was a pretty creative idea!

I spent some time with your sample, Joe, & I am running into a problem that my limited knowledge hasn't been able to fix yet... If the Recipe Name is shorter than your 22 Characters, (I tested this by changing the number of Characters) - then it puts the recipe name in both fields... listing the recipe name at the left and then again indented on the next line...

I tried adding an "IIf" Function to the 2nd field... =IIf([RecipeName]=[Count]>22,(Mid([RecipeName],InStrRev([RecipeName] & " "," ",22)+1)),Null) - so that the field would be blank if less than 22 characters... but then it always leaves the 2nd field Null even when there are more than 22 characters...

What am I doing wrong?

Thanks!
Alissa
Go to the top of the page
 
RJD
post Yesterday, 11:08 PM
Post#22


UtterAccess VIP
Posts: 9,661
Joined: 25-October 10
From: Gulf South USA


Hi Alissa: Yes, sorry, the second textbox needed a tweak. And you were on the right track, but your syntax is incorrect. Try this ...

=IIf(Len([RecipeName])<=22,Null,Mid([RecipeName],InStrRev([RecipeName] & " "," ",22)+1))

Compare this to your last post and examine the IIf first part logic.

I inadvertently made the short recipe name in my demo 21 characters long, and the added space made it 22, so threw off my second textbox logic. My error - right idea, just not complete logic, so threw off my test.

And see the revised demo attached.

You know, of course, that the 22 characters was arbitrary and that you can adjust that to accommodate whatever width you need.

HTH
Joe
Attached File(s)
Attached File  RecipeNames_Rev1.zip ( 19.98K )Number of downloads: 0
 

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
bookkeeper1142
post Yesterday, 11:47 PM
Post#23



Posts: 11
Joined: 26-November 13



Joy... that works perfectly.

And yes, I'll change the count when I figure out my font style...

Thank you!

-A

Go to the top of the page
 
RJD
post Yesterday, 11:55 PM
Post#24


UtterAccess VIP
Posts: 9,661
Joined: 25-October 10
From: Gulf South USA


You are very welcome, Alissa. Glad that works for you. thumbup.gif

Continued success ...

Regards,
Joe

--------------------
"Each problem that I solved became a rule, which served afterwards to solve other problems."
"You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing."

Rene Descartes 1596-1650 (Mathematician and Philosopher)
Go to the top of the page
 
2 Pages V < 1 2


Custom Search


RSSSearch   Top   Lo-Fi    19th June 2019 - 10:25 PM