Results 1 to 4 of 4
  1. #1
    JeRz is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    33

    Auto fill field not saving to table

    Hi All,



    I have a DB with 2 tables: tblFamily and tblIssues. When adding a new issue, the user clicks on a button which then brings up a form named FamilyFind. Within that form, a subform named tblFamilysubfrm displays. I have a dbl click event set to open a form called NewIssue when a user double clicks on the PatientID field within the subform. From there, the user enters the detail of the issue. However, I am attempting to get the MemberID and PatientID to carry over to the NewIssue form from the subform.

    The control sources for the MemberID and PatientID fields on the NewIssue form are currently set to the record source for the table. I am attempting to add code to the On Load event of the NewIssue form so that when the user double clicks on that specific PatientID within the subform, it will load the PatientID so they do not have to re-enter it. However, I keep getting errors when trying to do this.

    I have tried removing brackets where there are no spaces and have tried moving things around but to no avail. Here is what I have currently:
    Code:
    Me.PatientID=Forms![FamilyFind]![tblFamilysubfrm].Form![IDNumber]
    Can someone assist? I can provide additional info if needed.

    Thank you!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about using the OpenArgs argument of the OpenForm command? http://www.baldyweb.com/OpenArgs.htm

  3. #3
    JeRz is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    33
    Quote Originally Posted by RuralGuy View Post
    How about using the OpenArgs argument of the OpenForm command? http://www.baldyweb.com/OpenArgs.htm
    Thanks for providing this! Worked great!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great! I marked this thread as *Solved* for you using the *Thread Tools* at the top of the thread.
    https://www.accessforums.net/showthread.php?t=1828

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

Similar Threads

  1. Auto-fill one field from another table
    By tasoper in forum Access
    Replies: 3
    Last Post: 06-13-2014, 07:17 AM
  2. Replies: 3
    Last Post: 12-24-2013, 04:20 PM
  3. Replies: 5
    Last Post: 01-20-2011, 11:36 PM
  4. Auto-fill field not saving to table
    By aaid in forum Forms
    Replies: 1
    Last Post: 12-18-2009, 05:34 PM
  5. Auto Populated Field not Saving to Table
    By EstesExpress in forum Forms
    Replies: 4
    Last Post: 10-09-2009, 03:33 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