Link to home
Start Free TrialLog in
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
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eze Ukaoha
Eze Ukaoha

ASKER

Where do I put the code? inside the current button or should I create another button?
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
Solution provided