Create Update Query to update values from form to a table (1 Viewer)

Tor_Fey

Registered User.
Local time
Today, 17:19
Joined
Feb 8, 2013
Messages
121
Good Morning All;

I have a form called: frm_tf_ben_change_risk bound to a table called: tbl_TF_Ben_RiskScore. On the form I have created a button which I want to use to update a field from my form field: TF_Ben_Risk_Points to a field in another table called: TBL_TF_Ben_Main, to a field called: TF_Ben_Risk_Points_main.

I am unsure on how to create the update query to do this.

The table: tbl_ben_main has a field with tbl_tf_ben_riskscore id field and I only really want to update the field when it matched the ID field.

Your help is appreciated

Kind Regards
Tor Fey
 

Ranman256

Well-known member
Local time
Today, 12:19
Joined
Apr 9, 2015
Messages
4,337
in the update query, bring in the table, TBL_TF_Ben_Main
bring down the fields: TF_Ben_Risk_Points_main,
and the ID field.

1. now under criteria,put cursor in the criteria box under the ID field,
2. click BUILDER icon on the toolbar, this will let you pick the item on the form to get the
ID and the item to update to.
3. Choose forms, loaded forms, then pick the item on the form as ID criteria.

the query will use this ID as the criteria for the record to update,
do the same for the UPDATE TO field in TF_Ben_Risk_Points_main.

criteria will look like: forms!frm_tf_ben_change_risk!ID
update to will look like: forms!frm_tf_ben_change_risk!TF_Ben_Risk_Points

the query will update the target table using the ID from the form,
and update the target field to the value in the textbox on the form.
 

Users who are viewing this thread

Top Bottom