| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== UPDATE (write from screen to USE variables) ====== | [[untie disassociate a string value from an astring .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[upper return upper case .htm|{{btn_next_n.gif|Next page}}]] | | || **UPDATE(** [//first control//] [,//last control//] **)** {{blk2blue.jpg|blk2blue.jpg}} | **UPDATE** | Writes the contents of a control to its USE variable. | | //first control// | Field number or field equate label of a control, or the first control in a range of controls. | | //last control// | Field number or field equate label of the last control in a range of controls. | **UPDATE** writes the contents of a screen control to its USE variable. This takes the value displayed on screen and places it in the variable specified by the control's USE attribute. USE variables are updated automatically by ACCEPT as each control is accepted. However, certain events (such as an ALERTed key press) do not automatically update USE variables. This is the purpose of the UPDATE statement. | UPDATE | Updates all controls on the screen. | | UPDATE(//first control//) | Updates a specific USE variable from its associated screen control. | | UPDATE(//first control//,//last control//) | Updates the USE variables of an inclusive range of screen controls. | **Example:** **UPDATE(?)             !Update the currently selected control** **UPDATE                !Update all controls on the screen** **UPDATE(?Address)      !Update the address control** **UPDATE(3,7)           !Update controls 3 through 7** **UPDATE(?Name,?Zip)    !Update controls from name through zip** **UPDATE(?City,?City+2) !Update city and 2 controls following** **See Also:** [[field equate labels.htm|Field Equate Labels]] [[display write use variables to screen .htm|DISPLAY]] [[change change control field value .htm|CHANGE]]