Hello, I am doing an assignment in access 2007 and i'm stuck at updating a record.I have rent form where there is a textbox which label is film_ID and aside have a combo box with values:DVD,3D,Blue-ray label Medium.In the medium table, I have 4 fields namely Film_ID,DVD,3D,Blue-ray.I have a save button in the rent form and what I need is:When i clicked on save, it decrements DVD/3D/Blue-ray by 1 of the specified film_ID present in the medium table based on what film_ID and medium I entered in the rent form.
Actually I am trying to use an SQL update statement to perform this task but its not working.
DoCmd.RunSQL "UPDATE tbl_Medium SET DVD='DVD-1' WHERE tbl_medium.Film_ID='Frm_Rent.[Me.txtbox3]' and txtbox8='DVD'"
txtbox1 refers to Film_ID in medium
txtbox3 refers to film_ID in rent
txtbox8 refers to the combo box Medium in rent
I will be very gratefully if you can help me solve this since the submission of the assignment is approaching.