Hi,
I have a problem with an update query. I have a table with a list of errors tbl_Prijave, where a user enters what is wrong with a slot machine, one field (Popravljeno) is set to "false" to indicate that it isn't fixed yet. There is a form with a checkbox where a user indicates that that particular error is fixed. A button runs an update query which should update fields in a table for that record and turn that field to "true". My problem is, that when I run the query from a form it doesn't update the record I want, but always the first record with "false" in the table. Field broj_prijave is what relates all the tables and when I manually run the query it asks me for "broj_prijave" and updates the correct record. This is the SQL for my query:
UPDATE tbl_Prijave SET tbl_Prijave.popravljeno = True, tbl_Prijave.datum_popravka = Now(), tbl_Prijave.popravio = [forms]![frm_Vpis_Novega_Popravila]![cmb_Popravljao]
WHERE (((tbl_Prijave.popravljeno)=False) AND ((tbl_Prijave.broj_prijave)=[forms]![frm_Vpis_Novega_Popravila]![txt_Broj_Prijave]))
WITH OWNERACCESS OPTION;
I just hope somebody understands what I wrote
.
Regards, Samo
I have a problem with an update query. I have a table with a list of errors tbl_Prijave, where a user enters what is wrong with a slot machine, one field (Popravljeno) is set to "false" to indicate that it isn't fixed yet. There is a form with a checkbox where a user indicates that that particular error is fixed. A button runs an update query which should update fields in a table for that record and turn that field to "true". My problem is, that when I run the query from a form it doesn't update the record I want, but always the first record with "false" in the table. Field broj_prijave is what relates all the tables and when I manually run the query it asks me for "broj_prijave" and updates the correct record. This is the SQL for my query:
UPDATE tbl_Prijave SET tbl_Prijave.popravljeno = True, tbl_Prijave.datum_popravka = Now(), tbl_Prijave.popravio = [forms]![frm_Vpis_Novega_Popravila]![cmb_Popravljao]
WHERE (((tbl_Prijave.popravljeno)=False) AND ((tbl_Prijave.broj_prijave)=[forms]![frm_Vpis_Novega_Popravila]![txt_Broj_Prijave]))
WITH OWNERACCESS OPTION;
I just hope somebody understands what I wrote
Regards, Samo