Results 1 to 9 of 9
  1. #1
    justme4 is offline Novice
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    1

    Saving a new record

    Hey everyone,


    I created a form which users can fill the data fields (from few tables), and I want to save the data incerted as a new record in a specific table.
    How can I do it?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Bind form to table - set form's RecordSource property.

    Data is committed to table when:

    1. close table/query/bound form

    2. move to another record on table/query/bound form

    3. run code behind form to save record
    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
    AppBuilder is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    2
    Hi there,
    Are the form fields bound or unbound to the tables/query's?

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Yes, controls on a form are usually bound to a field that is in the table/query that the form is bound to.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    AppBuilder is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2019
    Posts
    2
    Yes, I know that in Access, by default they are bounded, but are they in this case?(that was my question)
    (btw I rarely bound anything I prefer doing it all VBA hardcoded)

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    but are they in this case?(that was my question)
    only you can see that. open the form in design view - do the controls say 'unbound' or do they have field names? Alterntavely look at the control properties - is the control source blank? if so it is unbound.

    Since you say 'btw I rarely bound anything I prefer doing it all VBA hardcoded', I'm wondering if I am misunderstanding the question, since you would know that

  7. #7
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Why not post a copy of your database and get direct, focused responses?
    Even a screen capture of the form design and properties.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    @Ajax, you are not responding to OP, that is another person asking for clarification from OP.
    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.

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    OOPS

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

Similar Threads

  1. Replies: 1
    Last Post: 11-19-2018, 07:57 PM
  2. when saving a record problem
    By sireesha in forum Access
    Replies: 7
    Last Post: 01-30-2013, 05:44 AM
  3. Message Box for Saving Record
    By Mahavir in forum Access
    Replies: 5
    Last Post: 12-29-2011, 12:13 PM
  4. Saving Record
    By mwabbe in forum Programming
    Replies: 12
    Last Post: 09-15-2010, 12:09 PM
  5. record saving twice in table
    By ds_8805 in forum Forms
    Replies: 15
    Last Post: 04-14-2010, 07:16 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