Hello,
I'm currently working on a tool in Access but I'm stuck. Here's a short description of what I want it to do: I want to be able to take a huge list of items that have certain ratings (for example AA, B, D) and when I run a query, I want it to randomly produce new ratings for the items based on certain probabilities and once a new rating is calculated, there will be certain new data generated, lets say x, y and z and then I add those three together to create my final data point, for each item.
The issue is, I can create the random new rating, and the calculation once I have x,y,z works, but I'm having trouble connecting x,y,z to that new random rating.
Currently, the code I use to create the new ratings is:
RandomNew: IIf(Rnd()<=[P of C to AA],"AA",IIf(Rnd(0)<=([P of C to AA]+[P of C to B]),"B","D")) ; where those are probabilities of a rating changing to AA, B or D.
This works fine but when I try to create something that is dependent on this new rating, things mess up and even a simple 'IF function' doesn't do what I need it to.
Like if I write in, if NewRating = AA, make x = 0.03, if it's B make x=0.2 else x=0.5, it doesn't work and gives me 0.03, 0.2 and 0.5 at random.
I would highly highly appreciate any help regarding this issue. I'm pretty new to Access so sorry if this is a stupid question.
Thank you so much in advance for anyone that read this.
-EB