help in if

do0ot

New Member
Joined
Mar 31, 2011
Messages
14
hi guys
im creating a parking system in ms acess but i need a help in the querys plz
ok first let me explain
i have a field called USERID , arrival time , leave time , fees

i want a code to write that : IF the USERID start with "IN" in the fees will type free
else
if the time between arrival and leave more than 1 hour in the fees will write 1$ it is possible to do it ?
plz help me ASAP i have a proejct to submite it
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
ya ok done it woooooooooooooooooooorks :D
really thnx bro :)
i have more Questions bs i dont wont to put u in stack with me :D
thanksssssssssssss
 
Upvote 0
Just an FYI for future reference:

If you have brand new questions, it is best to start them in a new thread.

The general rule of thumb is if it is a clarification, follow-up, or "bump", post it back to the original thread (do not start a new thread as threads of a duplicate nature are generally locked or deleted). If it is a new question, start a new thread.:)
 
Upvote 0
plz can edit this code that will show for "IN*" and "VI*" Free

Fees: IIf([userid] Like "IN*","FREE",IIf(DateDiff("h",[Arrival],[Leave])>=1,"RO" & DateDiff("h",[arrival],[leave])*1,"FREE"))
 
Upvote 0

Forum statistics

Threads
1,224,617
Messages
6,179,915
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top