Results 1 to 5 of 5
  1. #1
    EstesExpress is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    5

    Auto Populated Field not Saving to Table

    I have a form that we are going to use to track outages to our terminals. On the form, the user selects the terminal # and the rest of the information for the terminal auto populates from a query of the terminals table (Terminal name, address, etc). What I am using to auto populate fields is =[Term #].Column(1) for the first field and so on. They then enter the rest of the info (date of outage,etc). The issue I have is that when I look at the table for the outages, the auto populated fields are blank. Is there a way to save this data to the table?

  2. #2
    CGM3 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Atlanta, GA
    Posts
    49
    The problem seems to be that the text fields you are auto-populating are therefore not bound to the corresponding fields in the table to which you wish to save them, so their contents aren't placed in those fields. You need to add VBA code in the Save Record button's Click operation along the lines of:

    ' make sure the current record is the record you want to save to
    rsTable.Edit
    rsTable.Fields![Alpha] = txtAlpha.Value
    rsTable.Update

    --or possibly--

    sSQL = "INSERT INTO [The_Table] ([ID],[Alpha]) VALUES ('" & txtID.Value & "', '" & txtAlpha.Value & "')"
    DoCmd.RunSQL (sSQL)

    --or whatever prtocol you're comfortable with, in order to explicitly put the values in those text fields into the Access table.

  3. #3
    EstesExpress is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    5
    I tried both of your suggestions but I am getting a Error when I click the Save button, "Object Required".

  4. #4
    EstesExpress is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    5
    You know what, don't worry about it. I realized that I can use a query to get the results I need since the tables are linked. Thanks for the help.

  5. #5
    shahemaan is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2009
    Posts
    6

    Auto Populated Field not Saving to Table

    Hello,
    I am having the same problem in database i dont the same exercise as you. and my data is not saving in respected table could u help me please.

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

Similar Threads

  1. Access 2000 Auto Populated Fields
    By Cylena in forum Access
    Replies: 1
    Last Post: 05-18-2009, 07:50 AM
  2. Replies: 1
    Last Post: 03-08-2009, 01:50 PM
  3. auto populate and table relationships
    By jmarti57 in forum Access
    Replies: 0
    Last Post: 11-09-2008, 09:50 PM
  4. saving a list box to access table
    By newguy357 in forum Forms
    Replies: 0
    Last Post: 05-05-2006, 12:22 PM
  5. Auto-Create a Table
    By Mxcsquared in forum Forms
    Replies: 3
    Last Post: 01-28-2006, 11:36 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