Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Change it by referencing tblDeployment instead of tblLocation under the field name in the query design grid.



    Because of the "On Error Resume Next" line. The procedure errors but overrides the error message and continues to execute. The LocationID field value is not changed. Disable that line and you will get error message.
    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.

  2. #17
    stewegg is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    26
    LOL. yes. that on error resume next solved the problem. LOL thank you for all your help.

  3. #18
    stewegg is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    26
    One more quick question.
    Code:
    DoCmd.RunSQL ("INSERT INTO tblVisits(LocationID, VisitComments) VALUES (" & Me.EquipmentID & ", 'Status was changed to Storage')")
    The
    Code:
    Me.EquipmentID
    never showed up.
    How should I fix that?

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You did not include tblVisits in the posted db. I ran code to that line and Me.EquipmentID has value of 5204. Why would you save EquipmentID into LocationID field?
    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.

  5. #20
    stewegg is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    26
    Good catch. Problem Solved! Thank you very much for your help!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to change date format inside a text field?
    By johnrohan in forum Access
    Replies: 3
    Last Post: 08-21-2017, 12:59 PM
  2. Runt time error 3164 field can not be updated
    By sprtrmp in forum Programming
    Replies: 12
    Last Post: 10-27-2015, 07:06 AM
  3. Replies: 3
    Last Post: 05-27-2015, 08:35 AM
  4. Replies: 6
    Last Post: 07-24-2014, 08:18 AM
  5. Error # 3164 "field cannot be updated"
    By bbrazeau in forum Access
    Replies: 3
    Last Post: 08-29-2013, 01:18 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