Avatar of Eze Ukaoha
Eze Ukaoha
 asked on

USING INSERT INTO TO ADD IMAGE TO TABLE

Currentdb.Execute "INSERT INTO tblRegister(Surname,FirstName,MiddleName,Email,UserName,Password,ComfirmPassword,SecurityLevel,MobilePhoneNo,HomePhone,DateofBirth,Gender,MaritalStatus,NumberofChildren,Occupation,HomeAddress,StateofOrigin,Nationality)" & _
    " VALUES('" & Me.txtSurname.Value & "','" & Me.txtFName.Value & "','" & Me.txtMName.Value & "','" & Me.txtEmail.Value & "','" & _
Me.txtUsername.Value & "','" & Me.txtPassword.Value & "','" & Me.txtPasswordConfirm.Value & "','" & Me.cmbSecurityLevel.Value & "','" & _
Me.txtMobileNo.Value & "','" & Me.txtHomePhone & "','" & Me.txtDOB.Value & "','" & Me.cmbGender.Value & "','" & Me.cmbMaritalStatus.Value & "','" & Me.txtchildren.Value & "','" & _
Me.txtOccupation.Value & "','" & Me.txtAddress.Value & "','" & Me.State.Value & "','" & Me.txtNationality.Value & "')"

Above code is used to insert into table. Now, I have a field in the tblRegister named image. How can I insert the image into the field image together with other records when I clicked the button save. I have already added a filedialog that adds image to the form. Just want to insert the image to table by clicking the insert button
Images and Photos

Avatar of undefined
Last Comment
John Tsioumpris

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
John Tsioumpris

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Eze Ukaoha

ASKER
Where do I put the code? inside the current button or should I create another button?
John Tsioumpris

This up to you...normally you want to press 1 button to do all the job so add the method at the end of the click event..but you need to filter the recordset to point to the new record
John Tsioumpris

Solution provided
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck