Results 1 to 4 of 4
  1. #1
    MedMos is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    7

    Two tables, one form for dataentry, but sometimes getting error 3101?

    Hi all! Still an amateur at access...
    I have two tables, tblObject and tblPlace, linked by a one-to-many relation (one place can have many objects). FrmObject is for registering objects, and have a textbox for entering the placename. If the placename is unknown in tblPlace, frmPlace opens for registering the new place, and then closes. But unless I then enter the placename in the textbox in frmObject again (even though it is still there!) I get an error 3101 when trying to save the record. I am stumped, is there some way to requery a textbox or getting the form to recognize the text in the box?



    Many thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You say textbox but do you mean combobox?

    You are using the NotInList event of combobox to add new tblPlace record?

    The combobox must be requeried so its list is updated with the new record.

    Use: Response = acDataErrContinue

    Review:
    http://msdn.microsoft.com/en-us/libr...ffice.15).aspx
    http://www.blueclaw-db.com/access_no...ed_example.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    MedMos is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    7
    No, it is just a textbox (bound of course), using an AfterUpdate to check tblPlace (If IsNull(tblPlace.Name) then Open Form). It all works, except I'll have to re-enter the name in frmObject to have it recognize there is a matching record in tblPlace, else I get the 3101.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Why not using combobox?

    Try BeforeUpdate event instead of AfterUpdate to validate the entry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. BrowseTo and DataEntry on navigation form
    By Daimios in forum Forms
    Replies: 3
    Last Post: 06-05-2014, 07:31 AM
  2. Handling Error 3101 in Forms
    By draz in forum Forms
    Replies: 3
    Last Post: 08-23-2011, 08:34 AM
  3. Replies: 2
    Last Post: 08-01-2011, 11:35 PM
  4. Error 3101 (but it shouldn't?..)
    By opopanax666 in forum Programming
    Replies: 4
    Last Post: 12-09-2010, 09:07 AM
  5. Replies: 9
    Last Post: 09-25-2010, 10:14 AM

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