Hargreavesk
Technical User
Hi,
I have a cheque which converts it's amount from £513.00 to "Five Hundred Thirteen Pounds". I then use the following code:
FullAmount = Me.Amount_in_Words
Position = InStr(FullAmount, "Hundred"
+ Len("Hundred"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
LeftAmount = Left(FullAmount, Position)
RightAmount = Right(FullAmount, Len(FullAmount) - Position)
NewAmount = LeftAmount & "and " & RightAmount
Me.Amount_in_Words = NewAmount
This inserts "And" to make the NewAmount "Five Hundred And Thirteen Pounds"
I would like the InStr feature to search and add "And" after all instances of "Hundred" but it's only doing this after the first.
Does anyone know how I can do this?
Many thanks
Kate
I have a cheque which converts it's amount from £513.00 to "Five Hundred Thirteen Pounds". I then use the following code:
FullAmount = Me.Amount_in_Words
Position = InStr(FullAmount, "Hundred"
LeftAmount = Left(FullAmount, Position)
RightAmount = Right(FullAmount, Len(FullAmount) - Position)
NewAmount = LeftAmount & "and " & RightAmount
Me.Amount_in_Words = NewAmount
This inserts "And" to make the NewAmount "Five Hundred And Thirteen Pounds"
I would like the InStr feature to search and add "And" after all instances of "Hundred" but it's only doing this after the first.
Does anyone know how I can do this?
Many thanks
Kate