We help IT Professionals succeed at work.

INSERT INTO STATEMENT ERROR

Ukaoha Eze
Ukaoha Eze asked
on
45 Views
Last Modified: 2017-05-09
Currentdb.Execute "INSERT INTO tblRegister(Surname,FirstName,MiddleName,Email)" & _
    " VALUES(" & Me.txtSurname & ",'" & Me.txtFName & "','" & Me.txtMName & "','" & Me.txtEmail & "')"

The code above gives me run time error 3061: Too Few parameter: expected 1

Also, I discovered that when I typed (1) the figure (1) into the surname textbox on my form. It inserts into the table tblRegister without the error. How can I make it insert name (letter) into the surname and not a number? Thanks in advance for the answer
Comment
Watch Question

John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thanks so much. It all worked very well. Actually.
CERTIFIED EXPERT

Commented:
which comment(s) works for you? you may proceed to close this question.
CERTIFIED EXPERT

Commented:
please comment before we close this question.
CERTIFIED EXPERT

Commented:
suggested solutions resolved the issue.