SQL If /Else (1 Viewer)

georg7

Registered User.
Local time
Today, 05:33
Joined
Sep 3, 2019
Messages
84
Good morning,
I've 3 tables (tbl_Medical, tbl_Employee & reference table tbl_EmpMed).
fMedical in tbl_Medical is the standard frequency of each medical examination but they can be personalized if there is a need.
Frequency in tbl_Emplyee is the personalized frequency for each Employee.

My goal is that if the Button A in tbl_Employee is true the personalized frequency is used to create the next deadline. If the button is false the standard frequency is used.

I create the deadline in my query1 with A1: DatAdd("m";[Frequency];[mDate])


Best regads
Georg
 

Attachments

  • AbFra.JPG
    AbFra.JPG
    58.3 KB · Views: 44
  • Mitarbeiter.JPG
    Mitarbeiter.JPG
    20.8 KB · Views: 40
  • MitUnt.JPG
    MitUnt.JPG
    15.4 KB · Views: 42
  • Untersuchung.JPG
    Untersuchung.JPG
    18.1 KB · Views: 37

June7

AWF VIP
Local time
Today, 04:33
Joined
Mar 9, 2014
Messages
5,472
That's a checkbox for a Yes/No field, not a button.

DateAdd("m"; IIf([A], [Frequency], [fMedical]); [mDate])
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:33
Joined
May 7, 2009
Messages
19,245
what is ID on tbl_Medical? is it autonumber?
if it is then, if employee has same Med_ID, mdate will keep on adding 3 months when A field is clicked.
 

Users who are viewing this thread

Top Bottom