Results 1 to 5 of 5
  1. #1
    pwalter83 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    19

    Autofill Textbox Data In Form will not Save Data To Table

    Hi,

    I am trying to add records to a table (in SQL) through a form. All except the 2 autofilled textbox values are added into the rows in the table.

    I cant seem to find a way to add the values from the 2 autofilled textboxes to the table. Does someone know how it can be achieved ?



    Thanks !

    Paul

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    First question -

    What is the data that you are attempting to save a second time? The reason I say this, is that when you say "autofill" that usually means that someone has data in, say a company table, and they select the company for say a purchase order and then they want the address to autofill (DISPLAY) on the form. But you wouldn't save that data because it is already stored and associated with the company and you can get that information by using the CompanyID for that company.

    So, I would say that you might not really be wanting to save that data if it is stored somewhere else and associated with something else which is being stored.

  3. #3
    pwalter83 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    19
    Quote Originally Posted by boblarson View Post
    First question -

    What is the data that you are attempting to save a second time? The reason I say this, is that when you say "autofill" that usually means that someone has data in, say a company table, and they select the company for say a purchase order and then they want the address to autofill (DISPLAY) on the form. But you wouldn't save that data because it is already stored and associated with the company and you can get that information by using the CompanyID for that company.

    So, I would say that you might not really be wanting to save that data if it is stored somewhere else and associated with something else which is being stored.
    Thanks for your reply Bob,

    As far as your question is concerned, I would say that the combination of data for the 3 fields in the form - VESSEL_CD, VOYAGE_NUM and PORT_CD need to be validated in order to flag up possible duplicates. Apart from that any new data needs to be added to the existing table. I hope that answers your question.

    I have attached the form for better understanding. The form (based on the VESSEL table) has 9 components which includes 6 data entry textboxes, 1 combobox(which is used as a reference to autopopulate 2 textboxes), 2 auto populated textboxes and 1 button.

    One of the autopopulated textbox - LINE_CD gets the data from the combo box(SERVICE_CD). the other autopopu txtbox gets the data through LINE_CD by using a look up table(DIVISION).

    The values on the form need to be added (appended) as a record(or row) to the VESSEL table.

    The problem I am facing is the auto populated values (from the 2 text boxes) in the form do not get added to the table. I also get an error due to this :

    Run-time error '2105':

    You can't go to the specified record.
    Last edited by pwalter83; 12-21-2011 at 10:45 AM. Reason: addition

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Not sure when I'll get to this. I had my netbook with me which has 2010 on it but it is experiencing some sort of issues when trying to use the netbook so it appears I'll get the honor of wiping my hard drive and starting from scratch on it.

    I have 2007 and 2010 at home but I won't be home to do it. I have our work Christmas Party tonight. So, I'll have to see if I can do it tomorrow or if someone else can jump in with it (which is fine by me).

  5. #5
    pwalter83 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    19
    Quote Originally Posted by boblarson View Post
    Not sure when I'll get to this. I had my netbook with me which has 2010 on it but it is experiencing some sort of issues when trying to use the netbook so it appears I'll get the honor of wiping my hard drive and starting from scratch on it.

    I have 2007 and 2010 at home but I won't be home to do it. I have our work Christmas Party tonight. So, I'll have to see if I can do it tomorrow or if someone else can jump in with it (which is fine by me).
    Thanks a lot, Bob ! No worries, I am trying my best to resolve this too. Whenever you get time, you can give your inputs and suggestions. I undertand everyone is busy at this time the year.

    Thanks again !

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

Similar Threads

  1. Replies: 11
    Last Post: 07-24-2012, 07:50 PM
  2. Replies: 13
    Last Post: 09-14-2011, 07:19 AM
  3. Replies: 4
    Last Post: 01-05-2011, 07:56 AM
  4. Writing data from textbox to table
    By mll in forum Forms
    Replies: 4
    Last Post: 03-10-2010, 05:10 PM
  5. Autofill with data from another form
    By jacrum in forum Forms
    Replies: 2
    Last Post: 08-11-2009, 11:17 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