Results 1 to 3 of 3
  1. #1
    dbrittain is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2017
    Posts
    1

    Trying to use Update SQL to update field in table - not getting any results

    I created a test form with a command button - on click event trying to run the following code. Just storing a value to a variable and trying to update field in table called seq_no.



    Not getting any results -



    Private Sub TestUpdate_Click()
    Dim m_seq As Integer


    m_seq = 33


    DoCmd.RunSQL "update tmplineno set seq_no = " & m_seq


    End Sub

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Change the DoCmd to Debug.Print, then copy what it displays to a new query window and see if it runs.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    dbrittain,

    If you are brand new to Access, do yourself a big favor
    -watch some youtube videos on relational database concepts/theory (see below)
    -work through some tutorials to get familiar with design and approach
    -review this Access material from Crystal


    Too many people think that Access is going to build a database for them. Access is software and does nothing more than you tell it.
    Do not jump into Access without some basic knowledge of Database concepts and Systems Analysis.

    For a great into to Databases and Data Modelling see tutorials 1,2, and 4 in this series by Dr. Daniel Soper.
    The series starts here.

    For Systems/Business Analysis there are a number of free youtube videos by BA-Experts. They are great for concepts and approach and offer some humor at the same time. Don't overlook these. Each is about 10-15 minutes long.

    Always work from a problem/opportunity description. (Requirements)
    Construct a data model ( on paper with pencil ) to make sure you understand the "problem/opportunity".
    There are tutorials at RogersAccessLibrary that you can work through to understand tables and relationships to develop a data model that you can test.

    Here are 2 tutorials that you have to work through BUT you will learn. Each tutorial will take about 40-60 minutes.
    Class Info System

    Consolidated Widgets

    You should familiarize yourself with Normalization.

    Good luck.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-27-2016, 12:14 PM
  2. Replies: 2
    Last Post: 10-27-2016, 06:40 AM
  3. Replies: 1
    Last Post: 05-17-2013, 12:53 PM
  4. Replies: 2
    Last Post: 08-30-2012, 07:59 AM
  5. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 PM

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