SQL If /Else

georg7

Registered User.
Local time
Today, 00:55
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: 75
  • Mitarbeiter.JPG
    Mitarbeiter.JPG
    20.8 KB · Views: 71
  • MitUnt.JPG
    MitUnt.JPG
    15.4 KB · Views: 76
  • Untersuchung.JPG
    Untersuchung.JPG
    18.1 KB · Views: 68
That's a checkbox for a Yes/No field, not a button.

DateAdd("m"; IIf([A], [Frequency], [fMedical]); [mDate])
 
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

Back
Top Bottom