Hey there...I have written an SQL statement in Access '97 in order to decide wether a figure is "Low", "Med", or "High"...Now I need to set up a way to display the number of Lows, Meds, and Highs...I am not sure of wether you can declare variables in sql or how to go about doing this...the coding that i have now is as follows...the "Hours Weight:" portion sets up the name of the field where data is put in as noted by the code...
Hours Weight: IIf([Actual Hours]<41,"Low",IIf([Actual Hours]<240,"Medium","High")
I want to set this up so that separate variables are passed the respective number of Lows, Meds, highs so that that number can be displayed elsewhere in the query....if anyone could help me out with either the syntax of declaring the variables or have any suggestions to help my problem would be great....thanks!
another question that may help is how do you call a VBA module in this form...because then I could easily call that function to take care of eveything i need....I could change the code above to be
Hours Weight: [call to VBA]
where that function takes care of everything because i am much better with VBA
Hours Weight: IIf([Actual Hours]<41,"Low",IIf([Actual Hours]<240,"Medium","High")
I want to set this up so that separate variables are passed the respective number of Lows, Meds, highs so that that number can be displayed elsewhere in the query....if anyone could help me out with either the syntax of declaring the variables or have any suggestions to help my problem would be great....thanks!
another question that may help is how do you call a VBA module in this form...because then I could easily call that function to take care of eveything i need....I could change the code above to be
Hours Weight: [call to VBA]
where that function takes care of everything because i am much better with VBA