Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26

    How to link textbox data in a form to data in a table


    dahsdjahskjdhaskdhaksda
    Last edited by jimbob90; 08-01-2012 at 05:05 PM.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Have you bound the form and data controls? In other words, set RecordSource and ControlSource properties?

    Since you did attach the db and not just a screenshot, I have found answer to the above question. No, you have not bound the form and its controls. Bound form and controls are linked to table. All data entry/edits will pass direct to the table fields.

    Since there is no connection to the table, the macro to save record accomplishes nothing.

    Record entry/edit is committed to table from bound form/controls when the form closes or loses focus, move to another record, or run code.
    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.

  3. #3
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    jdhaskjdhkasjhdkashdkahskda
    Last edited by jimbob90; 08-01-2012 at 05:10 PM.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Set the RecordSource property of form. Set the ControlSource property of data controls.
    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. #5
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    what do i set them to???/

  6. #6
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    would you mind looking through my access file for me?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I did look through your file, that is how I discovered the form is not bound.

    Form in design view, open the Property window.

    Make sure form is selected. The form RecordSource must be a table, a query, or an SQL statement. Click the dropdown and select a table or query.

    Select a control. ControlSource must be a field of the form's RecordSource. Once the form is bound, the ControlSource dropdown will show a list of available fields.

    This is very basic Access functionality. Access Help has guidelines on building form.

    Also http://databases.about.com/od/tutori...s2007forms.htm
    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.

  8. #8
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    52571823812u3woijhkwjhdska
    Last edited by jimbob90; 08-01-2012 at 05:10 PM.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I would rather you build the form correctly yourself. As stated, this is VERY basic Access and you must understand this before continuing. Best way to learn is by doing. Did you select Rentals as the RecordSource and set each ControlSource to a field of Rentals? Then you have done what I would do.

    What do you mean by 'had data in the fields which i can not change'? This form when bound will display all existing records. If you want to enter a new record, must navigate to a new (blank) record. Can use the intrinsic navigation bar at bottom of the form to do that.
    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.

  10. #10
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    00000000000000000000000000000000000000000000000000 00000000000000000
    Last edited by jimbob90; 08-01-2012 at 05:10 PM.

  11. #11
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    skhdakjshdkjashdkajs
    Last edited by jimbob90; 08-01-2012 at 05:10 PM.

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    From post #2: Record entry/edit is committed to table from bound form/controls when the form closes or loses focus, move to another record, or run code.
    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.

  13. #13
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

  14. #14
    jimbob90 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Posts
    26
    jhksdhdkajshdkjahksd

  15. #15
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You now have the form and its controls bound. Closing the form or moving to another record will commit the record entry/edit to table. I notice that form losing focus is not committing the record as I thought it would.

    The record save button isn't working because there is no associated code. I thought it was an embedded macro in the first version. Now it is a VBA [Event Procedure]. However, there is no code in the procedure. Need: DoCmd.RunCommand acCmdSaveRecord

    Review:
    http://office.microsoft.com/en-us/ac...010341717.aspx
    http://www.access-vba.net/introducti...ccess-vba.html

    BTW, I deleted your new thread that duplicates this topic.
    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.

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

Similar Threads

  1. Save data from textbox to table
    By GrayWolf in forum Access
    Replies: 7
    Last Post: 03-27-2012, 09:21 AM
  2. Replies: 4
    Last Post: 12-22-2011, 03:04 AM
  3. Replies: 13
    Last Post: 09-14-2011, 07:19 AM
  4. Replies: 4
    Last Post: 01-05-2011, 07:56 AM
  5. Writing data from textbox to table
    By mll in forum Forms
    Replies: 4
    Last Post: 03-10-2010, 05:10 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