General discussion

  • Creator
  • #2259084

    MS Access


    by ashishab ·

    I would like to updete fields in existing Access table. I would like to add fields in that table

All Comments

  • Author
    • #3205709


      by tony hopkinson ·

      In reply to MS Access

      Update as in change the data, from access, open the table and type,

      From SQl
      Update MyTable Set MyField1 = ‘Value’,MyField2 = 123.8 Where MyKey = 1

      To change the structure of a table
      From access, pick the the table and select design,

      from SQL

      Alter table MyTable
      add MyNewColumn int not null

      Suggest you run thru a couple of tutorials mate, wanting to do this and not knowing how, suggests you need to reverse things a little.

      For instance before you restructure your tables you might want to back them up.

      • #3205694

        basic code

        by ashishab ·

        In reply to Hmm

        Is there away using access basic check if the field exist and if not then add to the table. I know how to add from gesign mode


        • #3205649

          I guess…

          by onbliss ·

          In reply to basic code

          …you are talking about adding a field programmatically, right?

          If yes, you would be using ADO/ADOX to do it. Before adding just check if the column exists. Here is a link that might start you:

          Note it is ASP code, you should be able to get an idea on how to it in Access using VBA.

        • #3282351

          post a question to technical q & a

          by tony hopkinson ·

          In reply to basic code

          how to check for and add fields programatically in vba with access. Not something I know off the top of my head as I try to steer clear of both.
          Google it, you’ll probably get several answers as well.

Viewing 0 reply threads