Auto update field on click

Orfeas

Registered User.
Local time
Today, 21:17
Joined
Mar 1, 2005
Messages
11
Hi after I searched the forum for a solution similar to my problem I did not find anything that worked.

I have a form that it is used for hiring DVDs.

There are fields among others like customer_id, copy_id and a hired field wich is true or false.

I also have a submit button which saves the record before you finish. I would like to make the hired field for this record updated to value "true" when I click the submit button.
 
Use an update query and run it on the click of the button.

i.e.

UPDATE MyTable SET Hired = True WHERE CopyID = [Forms]![MyForm]![txtCopyID]
 
Thanks a lot!

This seem to work!!!
 
There is no reason to run a query to update the current record. In fact, that can easily generate errors because your update query confilcts with the form's update because they are both updating the same record. Just put some value in the field you want to update.

Me.Hired = True
 

Users who are viewing this thread

Back
Top Bottom