Results 1 to 6 of 6
  1. #1
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170

    How do Fields and Records Get Saved to Tables?

    I need help troubleshooting an obstacle that has proved quite challenging in my Database. To solve it, I first need people to help me understand the different ways Access 2007 can save fields and records to tables.

    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    50,046
    You mean enter/edit data through form? Data entry/edit through a bound form is committed to table when:

    1. form is closed

    2. move to another record

    3. run code to save record


    Why don't you tell us about the issue?
    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
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Same issue as "Need Troubleshooting" thread, just trying to approach it from a different angle.

    I don't think I'm articulating myself correctly.

    So on a Form I have various Textboxes. What are the different ways I can have the information in that text box saved into a table field?

    I have heard that it can be done through an insert query? I am trying to find a work around to setting the Control Source of a textbox on a form to a table field.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    50,046
    An unbound control will show the same entered value for all records on the form. Is this a Single or Continuous view form?

    Yes, an UPDATE or INSERT sql action can edit existing record or create new record.

    Or if the field is included in the form RecordSource, simple VBA:

    Me!fieldname = Me.textboxname
    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
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170

  6. #6
    ipisors is offline Access Developer
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    119
    You can use a bound form, where the textbox's ControlSource property is a field in the form's recordsource, and that recordsource is either a table or an updateable query.

    You can use an unbound form, and code vba statements like
    Currentdb.Execute "INSERT INTO TBL_SOMETHING (FIELD1, FIELD2) VALUES ('" & ME.TEXTBOX1.VALUE & "', 'SOMETHING ELSE')

    Or you can have a saved Insert or Update action query that refers to the Form control.

    Or you can have a saved query and manipulate the CurrentDb.Querydefs("name of query").Sql , which is something I do a lot, if the form is unbound.

    Sorry, don't mean to butt in when you said "solved", but I like to think of a thread as always open for more discussion - it's much more enriching to everyone that way.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2012, 01:01 PM
  2. Replies: 12
    Last Post: 11-21-2012, 01:51 PM
  3. Fields get saved in DB when I search!
    By accessnewb in forum Programming
    Replies: 2
    Last Post: 07-25-2011, 09:44 AM
  4. Losing Records Saved From Form
    By ProgZ in forum Forms
    Replies: 2
    Last Post: 04-17-2011, 11:32 PM
  5. Entries not saved in fields
    By Lynn in forum Forms
    Replies: 4
    Last Post: 06-02-2010, 09:53 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 - Senior Forums