Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    79

    Unanswered: insert into from one form to a table

    I am using Access 2007 and am trying to use an "insert into" statement to copy one field from a form into a field called number in another table.

    insert into SurveyQuestion [number] VALUES me![number]

    Thank you

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Quote Originally Posted by miracleblake
    I am using Access 2007 and am trying to use an "insert into" statement to copy one field from a form into a field called number in another table.

    insert into SurveyQuestion [number] VALUES me![number]

    Thank you
    So what's the question? Have a look at this.

    By the way, you may want to rename your "number" field to NOT be a reserved word.
    Me.Geek = True

  3. #3
    Join Date
    Nov 2005
    Posts
    79

    Talking I figured it out

    Please forgive me for not stating my question well. It may have been a little frustration with not getting everything to work as it should My question was that I wanted to create an "Insert into" statement to copy information from a text field on one form titled "controlnumber" to a field "controlnumber" in a table titled "SurveyQuestion"

    I was able to figure it out. As advised, I did change the reserved word "number." I changed the statement to the following and it did work for me.

    STRSELECT = "insert into SurveyQuestion (controlnumber) VALUES(controlnumber)"
    DoCmd****nSQL (STRSELECT)

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •