Need help with my code, I use SQL syntax.
I use a user control for the photo and i got an Argument not Optional error in this line ""'" & Replace(Me.phPr ofiler.SavePhoto, "'", "''")". Please help me with this. Thanks in advance.
Code:
Request = "INSERT INTO tblEmployeeInfo VALUES(" & Replace(Me.txtID.Text, "'", "''") & "," & _ "'" & AccessCode & "'," & _ "'" & Replace(Me.txtLastName.Text & ", " & Me.txtFirstName.Text _ & " " & Me.txtMidleName.Text, "'", "''") & "'," & _ "'" & Replace(Me.cboGender.Text, "'", "''") & "'," & _ "'" & Format(Me.dtpBDate.Value, "MM/dd/yyy") & "'," & _ "'" & CurrentAge & "'," & _ "'" & Replace(Me.txtAddress.Text, "'", "''") & "'," & _ "'" & Replace(Me.txtContact.Text, "'", "''") & "'," & _ "'" & Replace(Me.txtEmail.Text, "'", "''") & "'," & _ "'" & Replace(Me.mskFrom.Text, "'", "''") & "'," & _ "'" & Replace(Me.mskTo.Text, "'", "''") & "'," & _ "'" & Replace(Me.cboDepartment.Text, "'", "''") & "'," & _ "'" & Replace(Me.phProfiler.SavePhoto, "'", "''") & "')"
Comment