could u help as i need to create iff function for SLA and priorties
as i want to say: if the case is priorty 1 so the sla will be 4 hours and if it is p2 it will be 8 hrs and p3 is 24 hrs (this is the first field SLA ) and i need the results in date and time ,, so could u help me please,
@Hentanimanga You really can't create a SELECT CASE statement inside a query - which is where the IIF function is handy. You can NEST multiple IIF functions, though: IIF(X=Y,True,IIF(X=B,True,False))
Woow!! Cool!. You don't even know, how helpful it was for me. I've spent a lot of time for searching a function that writes text depending on value!! thanks.
You can't do this in a query, but you could do it in a form with a little programming. You would use an AfterUpdate event for a checkbox and say something like:
If CheckBox1 then CheckBox2.visible = true
else CheckBox2.visible = false
end if
Look for my other video tutorials on the AfterUpdate event for more help.
@599CD Sorry, could I please ask a question. Is there a formula/function I could use to add numbers in a field if the numbers in another parallel field where the same? E.g: Pupil ID | Points 1 2 1 3 2 3 Is there a formula I could use to that would make a query find the records with same 'Pupil ID', and then add the 'Points' they have together. E.g: Pupil ID | Points 1 2 1 3 It would then add 2+3 in a new column to make 5? Thx
Yes, you can "nest" your IF functions, but you want to use the VLOOKUP function for this. Go to my playlists. I have a video for VLOOKUP which covers this exact example.
COOOOOOOOOL Absolutely cool!!!! think I'm gonna die at my computer project but this vid is like a holy water for me hahaha
thank you very much Mr.Richard :)
lllRIPlll 1 week ago
WOOOOOOOOOOOOOOOOOOOOW i just did this thanks
MrWatandoost 1 month ago
If I type "True" in criteria, what will I get?
MrDusanrak 2 months ago
dear 599CD,
could u help as i need to create iff function for SLA and priorties
as i want to say: if the case is priorty 1 so the sla will be 4 hours and if it is p2 it will be 8 hrs and p3 is 24 hrs (this is the first field SLA ) and i need the results in date and time ,, so could u help me please,
thanks in advance
mrguitareg 8 months ago
This is very useful to me, but how would I go about making a CASE function, as in VB.
For instance.
Select Case Number Case >100 Bla = "True"
Hentanimanga 9 months ago
@Hentanimanga You really can't create a SELECT CASE statement inside a query - which is where the IIF function is handy. You can NEST multiple IIF functions, though: IIF(X=Y,True,IIF(X=B,True,False))
599CD 9 months ago
This is very useful to me, but how would I go about making a CASE function, as in VB.
For instance.
Select Case Number Case >100 Bla = "True"
Hentanimanga 9 months ago
Great video...Good pace and very clear. How would you COUNT the number of records that were from NY?
VBPE 1 year ago
@VBPE Use an Aggregate Query and set the field to COUNT. Look in my playlist for the "Microsoft Access Aggregate Query" lesson.
599CD 1 year ago
thanks man took me forever to figure this part out
grandeflw38 1 year ago
Thank you, this helped me understand how to do this.
KainzoFan 1 year ago
Woow!! Cool!. You don't even know, how helpful it was for me. I've spent a lot of time for searching a function that writes text depending on value!! thanks.
Artgorgeous 2 years ago
Thanks for the Good Example Keep up the Good Work.
neumans2000 2 years ago
Also, how would I make this work?
for instance, say I want a field to show up, only if another field is checked as yes?
For instance
Admin | Moderator | D.O.B
If admin is ticked, moderator would show up, otherwise moderator is hidden. Is this possible at all?
wiihaward94 2 years ago
You can't do this in a query, but you could do it in a form with a little programming. You would use an AfterUpdate event for a checkbox and say something like:
If CheckBox1 then CheckBox2.visible = true
else CheckBox2.visible = false
end if
Look for my other video tutorials on the AfterUpdate event for more help.
599CD 2 years ago
Whats a primary key? I know this is completely off topic but what is it?
wiihaward94 2 years ago
wait, isnt VLookup for excel??
leeme92 2 years ago
You are ABSOLUTELY correct. I meant to say DLOOKUP. I work so much between Access and Excel that I often say one when I mean the other. :)
599CD 2 years ago
13baldjj 1 year ago
thankyou so much for the quick response and useful help :)
leeme92 2 years ago
is it possible to have more that two outcomes?? for example i want it to check a score(numerical value)
IF its > 20 then the grade is 'A'
IF its >15 then the grade is a 'B'
IF its> 10 Then the grade is 'C' etc
leeme92 2 years ago
Yes, you can "nest" your IF functions, but you want to use the VLOOKUP function for this. Go to my playlists. I have a video for VLOOKUP which covers this exact example.
599CD 2 years ago
thankyou soo much for this it really helped in my Alevel college work, awaiting the results lol thanks again
leeme92 2 years ago
Where do I input this IIF Function in Form? What if I want the field to be displayed as "New" when the field expression equals to zero?
heavenbear 2 years ago
to make the answer of -1 or 0, we can change the function to
IIF=([State]="NY","True","False")
jnnycliff 3 years ago