Hello,
I know others have the same problem here, I tried (a lot! ) different solutions but still can't get around the problem.. :s
Here's the code:
cb_ is a ComboBox
Do I need " DoCmd.GoToRecor d , , acGoTo " ?
Besides this, the error is data type mismatch in criteria expression
(Where did he say??)
So I guess there is a missmatch between the type of value I get from the ComboBox
and the type of value of the SOP_install field (number).
The error is still there even if I add ".ToNumber" or not to cb_blabla.Colum n(0)
RN_EQU: primary key and autonumber (long integer)
SOP_install: number (long integer) in both tables..
The Message Boxes display the correct numbers. Either with .Value or not.
Can anyone tell me what is going wrong here?
If more info needed, don't hesitate to ask!
I know others have the same problem here, I tried (a lot! ) different solutions but still can't get around the problem.. :s
Here's the code:
Code:
Private Sub cb_swedit_sopi_AfterUpdate()
Dim qry_upd_sopi As Variant
On Error GoTo Err_sopi_AfterUpdate
MsgBox (Me.RN_EQU)
MsgBox (Me.cb_swedit_sopi.Column(0))
Me.txt_swedit_sopi_nr = Me.cb_swedit_sopi.Column(2)
qry_upd_sopi = "UPDATE [Equipment and Software] SET [Equipment and Software].SOP_install = '& Me.cb_swedit_sopi.Column(0) &' WHERE [Equipment and Software].RN_EQU = ' & Me.RN_EQU.Value &';"
DoCmd.RunSQL qry_upd_sopi
Err_sopi_AfterUpdate:
MsgBox Err.Description
End Sub
Do I need " DoCmd.GoToRecor d , , acGoTo " ?
Besides this, the error is data type mismatch in criteria expression
(Where did he say??)
So I guess there is a missmatch between the type of value I get from the ComboBox
and the type of value of the SOP_install field (number).
The error is still there even if I add ".ToNumber" or not to cb_blabla.Colum n(0)
RN_EQU: primary key and autonumber (long integer)
SOP_install: number (long integer) in both tables..
The Message Boxes display the correct numbers. Either with .Value or not.
Can anyone tell me what is going wrong here?
If more info needed, don't hesitate to ask!
Comment