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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nz formula

Status
Not open for further replies.

Zerdax

Programmer
Apr 20, 2005
48
IE
hi i want to use a Nz («expr»; «valueifnull») formula combined with a iif formula on a textbox where an value can be enterd in addition to a code feeded in.

should be like this.

If value true then ok. if not then import from [text97]
Any one can form this formula for me. the tekstbox is linked with an table.

Thanks...
 
How are ya Zerdax . . . . .

Try this:
Code:
[blue]IIf(IsNull(Value),Forms!YourFormName!Text97,Value)[/blue]

Calvin.gif
See Ya! . . . . . .
 
hi, i tryed but got error about comma.

I tryed this. Please correct it. thanks

= IIf(IsNull(Value),Forms!Register Form!Text99,Value)



 
= IIf(IsNull(Value),Forms![Register Form]!Text99,Value)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
still cant enter it. It says invalid syntax. operant enter etc......

= IIf(IsNull(Value),Forms![Register Form]!Text99,Value)
am i supposed to enter comma or....
 
Got it. no comma. hehe
semicommas

thanks
 
ehmm. a problem with that.
it wont import.
it does import but the start value. it doesn`t update.
first it displays name#? then when i enter a value in another box it gets the value 0 that is because the calculation isn`t finished yet. when calculation are finished it does not import the result from [text99]

Any help....
Please
 
Zerdax . . . . .

[ol][li]In your post origination you referenced [blue]text97[/blue] then changed it to [blue]text99[/blue].[/li]
[li]Where is [purple]Value[/purple] coming from?
Post how your referencing Value.[/li]
[li]Post a complete IIf example including Value[/li]
[li]By any chance is the textbox with the IIf on a subform and value on the mainform, or viceversa?[/li][/ol]


Calvin.gif
See Ya! . . . . . .
 
1. iam using the code for 2 different textboxes who are getting value from different textboxes.

=IIf(IsNull([Value]);Forms![Register Form]!Text97;[Value])

Iff this textbox "selling_price_wholesale" contains an value then let it be. if the there is no value in it then import the value from [text97].
Did u get it. i does. but it does import the starting value in [text97] when the value changes in [text97] it stays unchanged.
hope u got it....
 
Zerdax said:
[blue]first it displays name#? then when i enter a value in another box it gets the value 0 [purple]that is because the calculation isn`t finished yet.[/purple] when calculation are finished it does not import the result from [text99][/blue]
Apparently additional controls need to be tested for null in the formula (if its going to respond properly)!

I don't know if these other calculations are performed in VBA or not, but according to the sequence of calculations in the form, its possible you may require a [purple]ReCalc[/purple] of the form to get the the textboxes to update properly. Hard to tell yet.

I'm gonna stop here because I see you've originated another post, and I'm probably wasting my time . . . . .

Calvin.gif
See Ya! . . . . . .
 
no u are not wasting ur time. U are helping me alot.
I am doin all the calc in textboxes linked to a table.
The formula works but it gets the starting value not the value shown after calc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top