Can anyone help with this issue?
I need an iif or VBA/SQL case statement that runs a query based on the state of a checkbox on a form or a popup input box
This is this is module conversion of the macro that updates_fake_flightpath_in_students_table. I need this process to programmably select between two choices.
'
'------------------------------------------------------------
'Function updates_fake_flightpath_in_students_table()
'On Error GoTo updates_fake_flightpath_in_students_table_Err
'insert EXPL-CoD in student fake flightpath
DoCmd.OpenQuery "selects and UPDATES flightpath EXPL-CoD students", acViewNormal, acEdit
'iif([checkbox on form]=yes or [input box = yes], then run this query
'DoCmd.OpenQuery "selects and UPDATES flightpath NO EXPL-HPP students", acViewNormal, acEdit
'iif([Checkbox on a form]=no or [input box = no], then run this query
DoCmd.OpenQuery "selects and UPDATES flightpath EXPL-HPP students", acViewNormal, acEdit ' allows EXPL-HPP to be scheduled separately from HC
'then run rest of update queries
' DoCmd.OpenQuery "updates flightpath EXPL student records", acViewNormal, acEdit
' DoCmd.OpenQuery "make Student update temp table", acViewNormal, acEdit
' DoCmd.OpenQuery "updates flightpath in student records", acViewNormal, acEdit
'updates_fake_flightpath_in_students_table_Exit:
' Exit Function
'updates_fake_flightpath_in_students_table_Err:
' MsgBox Error$
' Resume updates_fake_flightpath_in_students_table_Exit
'End Function