Results 1 to 5 of 5
  1. #1
    Rookie is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    4

    Angry Pulled Data Not Saving

    I use [Form A].[Field Name] to populate [Form B].[Field Name]...but cannot get [Form B].[Field Name] to update in the table. All data entered gets saved to the table associated with [Form B] except this one piece of data. I used this in the Control Source of [Form B] to pull from [Form A]:


    =[Forms]![Main Form]![Event ID Number]
    The Record Source for Form A is Main Table
    The Record Source for Form B is CA Table
    Why will this one piece of data not save to the CA Table?

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Try doing a msgbox after your code to see what value it's grabbing.

    Example:
    me.SomeFieldName.value = [Forms]![Main Form]![Event ID Number]
    msgbox "Value from Main Form Event ID Number = " & me.SomeFieldName.value

    You'll either get an error that it cannot find [Event ID Number] on [Main Form] or you'll get a blank value (depending on how the form is designed, you may also need a refresh command.)

    me.SomeFieldName.value = [Forms]![Main Form]![Event ID Number]
    refresh
    msgbox "Value from Main Form Event ID Number = " & me.SomeFieldName.value

    or
    msgbox "Value from Main Form Event ID Number = " & [Forms]![Main Form]![Event ID Number]

  3. #3
    Rookie is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    4
    Wow, thanks for the quick reply! Using your suggestion, it returns the proper value from [Forms]![Main Form]![Event ID Number]. So it is seeing the correct number from [Main Form], but just not saving this number into the "CA Table" when I exit the form.

  4. #4
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Try adding a refresh command before the form is closed. Do you have an autonumber in the recordsource table? If so, the refresh should work. If not, I'd add one or you may have to do a docmd.saverecord somewhere.

  5. #5
    Rookie is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    4

    Smile One Solution

    I was able to solve this by setting the Control Source for Form B to the name of the field in the Table ("CA Table") I wanted to save to, and then adding to the "Default Value" in Properties for the Control in Form B:
    =[Forms]![Main Form]![Event ID Number]. I want to make sure you guys all know that I appreciate your help and your quick responses, Thank you!

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

Similar Threads

  1. Access 2010 Data not saving
    By Stenya1177 in forum Access
    Replies: 1
    Last Post: 07-07-2011, 09:41 AM
  2. Data Not Saving To Table
    By AUS1960 in forum Forms
    Replies: 2
    Last Post: 05-11-2011, 05:35 AM
  3. Replies: 23
    Last Post: 02-09-2011, 10:56 AM
  4. Saving data
    By mwabbe in forum Access
    Replies: 1
    Last Post: 09-09-2010, 11:18 AM
  5. Saving forms as Data Access Pages
    By frowsyone in forum Access
    Replies: 1
    Last Post: 03-08-2010, 08:25 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