We help IT Professionals succeed at work.

USING INSERT INTO TO ADD IMAGE TO TABLE

Eze Ukaoha
Eze Ukaoha asked
on
104 Views
Last Modified: 2017-04-15
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
Comment
Watch Question

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

Author

Commented:
Where do I put the code? inside the current button or should I create another button?
John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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 TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Solution provided

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions