Results 1 to 2 of 2
  1. #1
    dbansal is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Posts
    2

    Running update query in access 2010

    Hello all!

    I am a n00b. I am trying to run the following SQL syntax in access 2010 :
    Update refApplications Set CertifiedDate = cmbdate.value,approvedBy = cmbApprover.Value,[approvedby(Dataowner)] = cmbDataOwner.Value where name = cmbApplication.Value

    where the *.value are fields in a custom form. I am trying to hook up the above to a button to execute the SQL syntax. However, where should I stick this in? I tried over vba with the following however, it could not find the table for some reason.

    Private Sub Command20_Click()
    Dim strSQL As String
    Dim cn As ADODB.Connection


    Dim cmd As ADODB.Command
    Set cn = CurrentProject.Connection

    MsgBox cmbDate.Value

    strSQL = "Update refApplications Set CertifiedDate = cmbdate.value,approvedBy = cmbApprover.Value,[approvedby(Dataowner)] = cmbDataOwner.Value where name = cmbApplication.Value"
    DoCmd.RunSQL strSQL

    End Sub

    Please help me out!!!

  2. #2
    dbansal is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Posts
    2
    for my forms I am using linked tables to SQL server 2005

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2010
    By Desstro in forum Access
    Replies: 8
    Last Post: 01-19-2016, 04:09 PM
  2. SharePoint and Access 2010
    By ksmith in forum SharePoint
    Replies: 4
    Last Post: 08-24-2010, 09:19 AM
  3. MS Access 2007 vs 2010
    By ralphjramirez in forum Access
    Replies: 2
    Last Post: 05-06-2010, 06:30 PM
  4. Help Automatically running and Update Query
    By JohnRandolphSTL in forum Queries
    Replies: 8
    Last Post: 04-13-2010, 02:08 PM
  5. running a function after update
    By jamin14 in forum Programming
    Replies: 9
    Last Post: 04-06-2010, 09:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums