Results 1 to 10 of 10
  1. #1
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16

    common form fields


    I have a db with 7 forms. On each form there are 20 - 40 fields on each. The first 20 are the same on each form. I have a few questions... 1) best way to have data entered on first form carry over...autosave? 2) is there a more OOP way of creating a single form that is reused on each form so there is on commonality and code reuse?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Form layout is based on table layout, and it sounds like yours might be flawed. Why would they share 20 fields? Can you give us an idea of your table structure?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16
    I have taken over the project and it is a single table. 7 forms are used to manage x number of fields each, but their are 20 fields that show on each form. May need to add an "IsDirty" check between tab navigation with forms are opened. THe users open x number of forms, then edit data as they navigate through the tabs, not always saving while on a form.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sounds like the database is not normalized. Have you considered a single form with a tab control to organized the fields? From the sound of it, you'd have the 20 fields above the tab control so they always showed, and the rest on tabs.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16
    Was justs pencil sketching that possibility. Add a "save" button to each tabbed area to entice saving work before changing tabs. Can you check for Dirty on tab click? EDIT: Since it would be one form, I can check for Dirty when someone tries to close it vs on each tab.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Since it's one form, the data would all save at once, not just the data on that tab. If it's a bound form, you don't have to bother checking; it will automatically try and save if the user closes the form. If you're trying to avoid that, the before update event is the place to abort the save.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16
    I will give that a whirl. I am not an Access wiz (C# dude) so not sure what a "bound" form is.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    A bound form is one that has a record source (a property of the form) of a table (or query). It is basically a window to that table, and any changes made to the data on the form are reflected in the table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    soulice is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    16
    From what I can tell, it must be bound as I can edit, then close it and all changes have been saved. Thanks!

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help! Bound forms are most common, as they let Access do most of the work for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 35
    Last Post: 09-19-2011, 10:13 AM
  2. Common entries within multiple tables
    By JesterMania in forum Queries
    Replies: 4
    Last Post: 08-02-2011, 02:57 PM
  3. Replies: 1
    Last Post: 06-09-2011, 10:12 PM
  4. Play sounds and Common Dialog Box example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-29-2010, 06:49 AM
  5. Replies: 3
    Last Post: 08-06-2009, 11:49 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