Convert To English ********************

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I have a db that write's check and like quicken or quickbooks after the
amount in english, that is
Four Hundred Dollars and No Cents

I would like it to show ********************* at the end
example:
Four Hundred Dollars and No Cents *****************************************

Is there a way to do this?
 
You should be able to construct some type of expression that would look
something like this (250 is an arbitrary number that I'm using for the
example):

MyOutput = Left(MyWordText & String(250, "*"), 250)
 
I have a db that write's check and like quicken or quickbooks after the
amount in english, that is
Four Hundred Dollars and No Cents

I would like it to show ********************* at the end
example:
Four Hundred Dollars and No Cents *****************************************

Is there a way to do this?

It shouldn't be a problem.
The real problem is not one of us knows what your report or code looks
like.
Best I can tell you now is concatentate an unbound control with the
value of the Text control and asterisks, something like this:
=[TextName] & string(x,"*")
where x is the number of asterisks you wish to add to the text.
Make sure the name of this control is not the same as the control name
that contains the text.

A word of advice... you'll need some method to change the number of
asterisks added, as some text will be longer than others. Perhaps
=[TextName] & IIf(len([TextName])<30,string(30,"*"),string(15,"*"))
 
Both controls are textboxes
expnetpay is in currency format
and ExpConEng shows expnetpay in english,
i.e. expnetpay = $65.00
ExpConEng = Sixty Five Dollars and No Cents
 
fredg said:
I have a db that write's check and like quicken or quickbooks after
the amount in english, that is
Four Hundred Dollars and No Cents

I would like it to show ********************* at the end
example:
Four Hundred Dollars and No Cents
*****************************************

Is there a way to do this?

It shouldn't be a problem.
The real problem is not one of us knows what your report or code looks
like.
Best I can tell you now is concatentate an unbound control with the
value of the Text control and asterisks, something like this:
=[TextName] & string(x,"*")
where x is the number of asterisks you wish to add to the text.
Make sure the name of this control is not the same as the control name
that contains the text.

A word of advice... you'll need some method to change the number of
asterisks added, as some text will be longer than others. Perhaps
=[TextName] & IIf(len([TextName])<30,string(30,"*"),string(15,"*"))

On a report, I don't think it would matter, so long as the concatenated
string is long enough to completely fill -- or more than fill -- the
text box. On a form, though, I think you can get partial characters
displayed, which would be undesirable. If neceassary, you could use
some of Stephen Lebans' code ("TextWidthHeight", or something like that)
to figure out how many characters you need to fill.
 
Back
Top