Results 1 to 12 of 12
  1. #1
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7

    Adding/Editing data with multiple forms and a single table

    I have created a database that at the moment only contain one table which stores information relating to only one subject. I have also created forms that have divided the table into subject based forms, for example, one form will be to enter and view the main topic and other forms will be to enter and view other details. The problem I am having is, when I enter information on one form and "Tab" to open the next form, access creates a new record every time a different form is opened. So if I open 3 forms, I get 3 different records that all start with the first field that is in the current form.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,537
    Why do you need 3 forms for one table?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7
    There will be times when I only want to change certain details. The table contains over 20 different fields and rather than tabbing through all of them, I made forms that take me to a certain detail subjects that are related to only one record. The problem I'm having, is when I enter the first bit of details and go to the form that has the details I want to change, as soon as I put information in the first field, access adds a whole new record.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Get the user to select the record first, then have three subforms on one form. Have a tab control with three pages and on each have a subform with only those fields you want. The combobox on the main form will select the record, the subforms will be linked to the main form via that primary key.

  5. #5
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7
    That seems to work, but is there another way of viewing what records are in the database. I see how the link in the main form lets me enter and change data in the subforms, but if I don't highlight the item I want to modify, it adds a new record.

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Another way than the user selecting which record to view? What did you have in mind? You could have a combobox or a list box or another subform on another page, all which could show all the records in the table.

    I don't know why it is adding a new record, it is the way your form is set up. For instance, what is the form's "Default View" property, also the Cycle property? Those are two that come to mind that may affect the way you are doing things but there could be other methods as well.

    Can you explain how you see this happening, such as the sequence of events that the user does or wishes to do.

  7. #7
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7
    I was using a split form, which shows up in the Default View and the Cycle is set to "Current Record" on the form properties. I am using a combo box on the main form field that I'm using. It used to be a drop down box on my split forms, but since I did what you recommended it's a list that I have to scroll to get to the record I want.

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    It doesn't have to be a listbox for the record selection, it can - and usually is - a combobox. Both have the same result, however, that the user can select a record which is then displayed on the rest of the form(s). When the form is opened, are the subforms showing a new blank record or the first entry in the table? How would you like the user to add a new record?

  9. #9
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7
    I found the problem. The field property was set to "List Box", not "Combo Box". I entered a few records last night and everything works great. I've added additional navigation buttons and they also work great.

    Thanks so much for your time and expertise.

  10. #10
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7
    I have one other question. Is there a way to sort a combo box list alphabetically?

  11. #11
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    If the combobox is based on a query/SQL then add the sort order to that.

  12. #12
    Rtram is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    7
    LOL since I really don't have that many different titles, I did it manually.

    Thank you again for all your help.

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

Similar Threads

  1. Editing data on single/multiple subforms
    By Bradex in forum Forms
    Replies: 5
    Last Post: 08-06-2016, 07:28 AM
  2. Replies: 3
    Last Post: 04-21-2014, 06:52 AM
  3. Multiple Sub-Forms in a main form for editing
    By Harley Guy in forum Forms
    Replies: 1
    Last Post: 12-19-2013, 12:54 PM
  4. Replies: 10
    Last Post: 08-09-2012, 01:07 PM
  5. Replies: 6
    Last Post: 07-02-2012, 02:53 PM

Tags for this Thread

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