Hi
I have a button on form "frm_ctn_List" called btn_StopOrdre. In the "on click" event of this I would like to show a msgbox if
field [MedarbejderID] in table "tbl_TidsTabel" equals combobox "cbm_Medarbejder" value.
and field [On] in table "tbl_TidsTabel" equals 0
Otherwise open form "frm_ctn_TidStop"
The openform criteria is working properly but first "if" statement is wrong
The combobox "cbm_Medarbejder" is in the current form.
I have a button on form "frm_ctn_List" called btn_StopOrdre. In the "on click" event of this I would like to show a msgbox if
field [MedarbejderID] in table "tbl_TidsTabel" equals combobox "cbm_Medarbejder" value.
and field [On] in table "tbl_TidsTabel" equals 0
Otherwise open form "frm_ctn_TidStop"
The openform criteria is working properly but first "if" statement is wrong
The combobox "cbm_Medarbejder" is in the current form.
Code:
If "MedarbejderID=" & cbm_Medarbejder.Value & "and [on]= 0" Then
MsgBox "Denne produktionsordre er ikke startet endnu!", vbOKOnly
Else
DoCmd.OpenForm "frm_ctn_TidStop", , , "MedarbejderID=" & cbm_Medarbejder.Value & "and [off]= 0", acFormEdit, acWindowNormal
End If