UPDATE table using SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benchpolo
    New Member
    • Sep 2007
    • 142

    UPDATE table using SQL

    I have 2 tables

    Table 1: Invoice
    Table 1 fields: ClientName, PostedPaid (Yes/No)

    Table 2: History
    Table 2 fields: ClientName, DatePaid

    Overview
    In form level when the user click SAVE the ClientName is stored in a Global Variable 'gClient'.

    After clicking the SAVE button there should a SQL UPDATE statement that inserts the gClient and the current date to History table.

    Question
    Do I need to make an ADODB connection to do the above description, or can execute UPDATE sql command through either MACRO RUNSQL?

    Please advise.

    Thanks.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    You can use the DoCmd.RunSQL() procedure.

    Comment

    Working...