Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox calc.

Status
Not open for further replies.

Zerdax

Programmer
Apr 20, 2005
48
IE
Can anybody correct this code.
=IF(ISTEXT( [Text56] )=TRUE;"";IF( [Selling Price Wholesale] <>"";IF( [Selling Price Wholesale] < [Text51] «Expr» ; «Expr» [Text51] * [Text56] «Expr» ; «Expr» [Selling Price Wholesale] ); «Expr» [Text51] * [Text56] ))

If text56 is enterd then it is ok, but if not then see the box "Selling price wholesale etc......

 
Can you please explain what you want to do and where ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
How are ya Zerdax . . . . .
[ol][li]Its [green]IIf[/green] not [red]If[/red].[/li]
[li]The seperator should be a comma ([green],[/green]) not a semicolon ([red];[/red]).[/li]
[li] All the section of the IIfs are complete. Can't tell more without the [blue]«Expr»[/blue].[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
The seperator should be a comma (,) not a semicolon (;).
How are you TheAceMan1 ...
All posters doesn't live in the USA you know ...
 
If you use the expression builder, the "«Expr»" should be replaced with your expression.

Try:

=IF(ISTEXT([Text56])=TRUE;"";IF( [Selling Price Wholesale] <>"";IF([Selling Price Wholesale]< [Text51];[Text51] * [Text56];[Selling Price Wholesale] );[Text51]*[Text56]))

Also, you may want to name your controls to reflect what they are. It will make your coding easier.
 
A problem accured.
Plz Help.
this accured #Name?
When i used this code:
=IF(ISTEXT([Text56])=True;"";IF([Selling Price Wholesale]<>"";IF([Selling Price Wholesale]<[Text51];[Text51]*[Text56];[Selling Price Wholesale]);[Text51]*[Text56]))
 
What is supposed to be ISTEXT ?
Shouldn't be IIf instead of IF ?
Are you trying to set the ControlSource property of an access TextBox ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV . . . .

I'm fine thanks, and yes I'm aware. Our foreign body at work, do it all the time . . .

Calvin.gif
See Ya! . . . . . .
 
hi.
ill ask it more simple.

I want this.
1. if enterd an value in [Selling Price Wholesale] then display this value (thats why i used. if(istext([selling price wholesale=true;""
2. if not then take the value from [text56] and use this formula ([Text51]/100)*[Text56] and export the result to [selling price wholesale]

Any body who can make this formula. a hard one this.
Good luck
 
Hopefully you aren't playing with the ControlSource property of [Selling Price Wholesale]...
=IIf(Trim([Selling Price Wholesale] & "") <> "", [Selling Price Wholesale], ([Text51]/100)*[Text56])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
didnt accepted it.
It says You omitted an operand or operator, you enterd an invalid character or comma, or you enterd text without surrounding it in quotation marks.
any idea. look at the code..
=IIf(Trim([Selling Price Wholesale] & "") <> "", [Selling Price Wholesale], ([Text51]/100)*[Text56])
 
Sorry, replace the commas with semi-colons:
=IIf(Trim([Selling Price Wholesale] & "") <> ""; [Selling Price Wholesale]; ([Text51]/100)*[Text56])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
another question. i hope i dont bother u.

I want that if [selling price wholesale is lower then [Text51] then add - infront of this calculation =([Selling Price Wholesale]*100)/[Text51]/100 else nothing.
is it possible
 
is it possible
Yes, simply replace the True part of your actual IIf with another IIf.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
got it didnt needed to add an iif.
Just changed the code and there we go.
Thanks anyways.
Yiiiihaaaa FINISHED AT LAST.
 
ehmm. a last question.
I have uploaded a .swf movie in a form.
But it is so slow, any thing i can do to accelerate it.
When i push the right mouse button on it then the movie playes fast.

any help

 
Zerdax, your last post has nothing to do with the topic of this thread, please start a new thread.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
oki.
But this has something to do with the topic.
Is it possible to import an value from an textbox to a textbox bound with an table if there is no value in it.
! import or write ur own value in the textbox

code should be:
Import from [text97] if no value in it.
It should update continously. cus the value that is supposed to import will be calculated when enterd other datas. so it wont import 0 cuz that is the value on start

Any help.
Complicated, hehe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top