1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2007: New Record in Multiplevalue field from Inputbox

Discussion in 'Business Applications' started by angells3333, Jun 25, 2010.

Thread Status:
Not open for further replies.
  1. angells3333

    angells3333 Thread Starter

    Jun 17, 2010
    Hi, I have a table that has a collection of group names. Each group name can be assigned to multiple issues - which come from another table.

    I made a form to create a new group name and a list box of all the available issues. I would like to have a command button "Create new Issue" so the user could add an issue to the list directly from that form through an inputbox.

    Here is the code I have so far:

    Private Sub Command15_Click()
    Dim strTmp As String
    Dim x As String
    x = InputBox("Please enter a new issue", "New Issue")
        If x <> Null Then
                strTmp = "INSERT INTO [Issues] ( [Keyword] ) " & _
                "SELECT "" & x & "" AS [Keyword];"
            DBEngine(0)(0).Execute strTmp, dbFailOnError
        End If
    End Sub
    This is code I borrowed from somewhere else and tweaked. I get the inputbox, but the data I type in doesn't get created as a new record in my Issues table.

  2. Rockn


    Jul 29, 2001
    Not sure what you mean. Do you want to have a dropdown list that they can add to if the item is not there? That is treading on giving users too much control over something that should be static. If a "group" needs to be created make an admin form for adding it to the table along with validation to prevent duplicates.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/931475

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice