Results 1 to 8 of 8
  1. #1
    softspoken is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    61

    updating a table from a form.....

    I created a database, split the database, put the front end on multiple users pc's, and now I have an issue.



    The issue is : I have a few fields that are drop down boxes so that they can pick something from the list. There will be times when they will have to key in something because it was not in the drop down box.

    Is there a way to add what was keyed in the form manually , automatically to the table that houses the drop down information?

    I hope that is clear enough....

    (Access 2003)

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,522
    Sure; search here on "notinlist". The Not In List event of the combo is commonly used to add new items.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    softspoken is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    61
    Quote Originally Posted by pbaldy View Post
    Sure; search here on "notinlist". The Not In List event of the combo is commonly used to add new items.

    I have looked at a few different examples of the not in list but I dont understand what I need to do fully. I am a novice user.

    Could you help me to get this working. The table that I have linked to the combo box is called "Summary of App Err" could you help me to write the code that would work for me?

    Thanks,

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,522
    Well, in your searching, presumably you saw two basic techniques. One adds the value in the combo directly into the table. The other opens a second form up, for times when there are other related values that have to be added (like if I'm adding a new customer number, I have to enter all the customer's info). Which did you need?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    softspoken is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    61
    Adds the value from the combo directly in to the table

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,522
    I linked to a couple of single item methods here:

    https://www.accessforums.net/access/...able-5199.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    softspoken is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    61
    Thank you for the links but I am definitely a novice user and its hard for me to read that and relate what the names of my tables are vs anyone elses and what would go where. If you dont have the time to actually help me create my on "Not in list" code I understand. Sorry for not being much help.

  8. #8
    softspoken is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    61
    Just for people reading this is what I found and it worked perfectly for my needs. Thanks for all your time and efforts. Its much appreciated.

    Dim rst As Object, txtName As String

    On Error GoTo errorcatch

    txtName = MsgBox("Add '" & NewData & "' to the list of Clients?", _
    vbQuestion + vbYesNo)
    If txtName = vbYes Then
    ' Add data stored in NewData argument to the Summary of App Err table.
    Set rst = CurrentDb.OpenRecordset("Summary of App Err")
    rst.AddNew
    rst!FieldName = NewData
    rst.Update
    Response = acDataErrAdded ' Requery the combo box list.
    Else
    Response = acDataErrDisplay ' Require the user to select
    End If
    rst.Close
    Set rst = Nothing
    Exit Sub
    errorcatch:
    MsgBox Err.Description

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

Similar Threads

  1. Updating data within a form/table.....
    By softspoken in forum Forms
    Replies: 3
    Last Post: 04-15-2010, 06:33 PM
  2. Updating a table from a form
    By Lynn in forum Forms
    Replies: 3
    Last Post: 03-18-2010, 10:51 AM
  3. Updating one table with anothers contents
    By munkifisht in forum Access
    Replies: 0
    Last Post: 07-22-2009, 03:22 PM
  4. Updating Table field from Form
    By Kunuk in forum Access
    Replies: 0
    Last Post: 02-26-2009, 11:41 PM
  5. Updating SQL server form Access form?
    By slash75 in forum Forms
    Replies: 1
    Last Post: 09-06-2008, 02:39 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