I have a form where a user uses a combobox to pick a position, then use another combobox to pick a training. Then there is a button to delete the selected training. For some reason when I try to run this code, it asks for a value for pos but there is an option chosen in the pos_cmb. Why is this happening and how could I fix it?
Dim trng As String
Dim pos As String
pos = Me.cmb_pos.Value
trng = Me.com_trng.Column(1)
MsgBox (trng)
DoCmd.SetWarnings False
strSQL = "Delete * From [TRNG_TBL] WHERE [POS_ID] = pos And [TRNG_ID] = trng"
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
End Sub