Consulting

Results 1 to 4 of 4

Thread: Multiple forms [Programming Technique suggestion]

  1. #1

    Multiple forms [Programming Technique suggestion]

    Hi,

    I am building a database which will records 100 details for a single customer in 5 different tables. They will be all recognized by an account number (Autonumber primarykey). Now when my teller starts to enter the data he has to fill 5 forms for a single customer.

    What I would like to know is what is the best practice to follow for information to flow between forums.

    Note: I want to enter details in tables only if the teller is successfully able to fill up all 5 forums. If he cancels in between the database should not be affected. To implement this I would need the information filled in 1 form to stay in memory till the last form is filled.

    What are the best practices to follow in this case.

    I could use global variables and put everything in them but I honestly do not want to make 100 variables as there are 100 fields in about 5 tables.

    Thoughts?

    Regards

  2. #2
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Welcome to the forum- it's always good to have new members.

    Instead of having 5 different forms and trying to track updates across all of them it would be easier to combine everything into a single form. I know what you're thinking- that's going to be a huge form, but Access has a built in object that can help streamline your form's design.

    First, you're going to need to bind the desired fields to your Form. Open a blank form in Design view and then look at the form's properties- click on the build button (...) next to the Record Source property. It will open up a Query Design window that you can use to create a query specifically for your Form. You can use this to pull the fields of all 5 tables at once.

    I would suggest using the Tab Control to create 5 tabs, one for each section of data you want entered. Each tab would replace one of the forms you used previously. Load the desired fields into each tab and you'll end up with a single form you can easily control.

    HTH
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  3. #3
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Expanding on what Randy has described, you can also Use the Tabbed Mainform with the main Customer detail as the Mainform and use 4 already Created Forms as Subforms to put on the 4 Tabs.
    The drawback is that you will need to set up the Master/Child Links between the main Form and the subforms on the tabs.
    An advantage is that you can use simple queries and forms which you can test Independently of the Main form to get them working how you want. They can aslo have their Own Tabs and Subforms if it makes sense to do it that way.

  4. #4
    Thanks guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •