You can not become a scientist if you require that every question has an answer because its the very questions that have no answer that attract you to a laboratory every single day.
I have a query to show me in a form what quantities of what salad went where. In my form I have 3 quantity fields, P(lanting)qty, N(ursery)qty and G(rowth)qty. What I want to do is have only 1 quantity field in my form so that when the StageID is 1, the quantity field shows the Pqty, if it is 2 it shows the Nqty and if it is 3 it shows the Gqty. I have been trying it with IIf functions in my query but cant' get it to work. Any advice would be much appreciated
Maarten Brusselers 17 days ago
Maarten Brusselers 17 days ago
Kevin Robertson 17 days ago
There are no joins in your Query.
You say you have been trying IIF functions. You haven't shown us what you have tried.
Maarten Brusselers 17 days ago
Thanks Kevin.
I noticed that after I sent it but everything worked anyway. I now made the joins but this made no difference. It's evening here now. Will try the IIf functions again tomorrow and show you
Maarten Brusselers 17 days ago
Hi Kevin, got it to work. As usual a spelling mistake. That happens to me lot. Thanks for the response
Maarten Brusselers 16 days ago
I got it to work but not really in the way it should, although the result is correct.
This is what I did: Quantity: IIf([StageID]=1,[Pquantity],IIf([StageID]=2,[NQuantity],[Gquantity]))
The 1, 2 and 3 are the different stages and by defining them in the IIF function they work. However, for proper database design I think they should take the value from the form and assign the proper quantity directly, without me inserting numerical values.
The form value is Forms]![LotToTableF]![StageID]. I have no idea how to do this.
Maarten Brusselers 16 days ago
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.