Results 1 to 6 of 6
  1. #1
    TiliaTree is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2014
    Posts
    6

    Open a number of Sub forms based on a numeric value

    i am trying to construct a Dbase that will be used by property surveyors when they visit a home where an incident has occurred that leads to an insurance claim.

    The main input form collects information about the property, address, contact details etc and includes a question " how many rooms have been damaged"



    From here the surveyor goes on to fill out a new form.
    This is achieved by clicking "next" and then a new form opens that collects info about the damaged room; its dimensions, type of damage etc.
    At the bottom of this form are two command buttons
    1 - Add another room
    2 - Finish

    Whilst this works, it does strike me that i have, for report printing purposes, asked the surveyor earlier in the process, how many rooms there were.

    So I'm thinking of changing the layout of the data collection so that the room damage form opens as a subform on the screen. BUT what would be far more elegant is to reference the earlier question " how many rooms are damaged?" and use that, for example, 3, to open the sub form 3 times. To my mind it just looks a bit amateur at the moment to ask how many rooms and then keep asking them if they "need to add another room".

    The collection of subforms will be bigger than the available screen space, but a vertical scroll bar will take care of that.At the end of the data input they can then simply click one command button to save all the data in one go.

    Can anyone suggest a way this can be achieved. If not I'll stick with Plan A
    Thanks in advance.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    I assume that the figure given for the number of rooms is stored in table field. I would not save this number as it is really a calculation. IMHO it would be better to remove this from the first form. When the time comes to print a report, you can use a calculated control (perhaps using DCount()) on the report to show the number of rooms.
    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
    TiliaTree is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2014
    Posts
    6
    Get where you are coming from and it makes sense, other than i wouldn't know how many iterations of the subform to display.
    The more i think about it the more i think that asking them to "add another room" is the answer. Tthey can then add as many variations as they need to and each one can just be displayed as a refreshed version of the form they are using, although one of the other advantages would be that they can see what they have input for the other areas.
    Probably needs some more thought really. but thanks for the response anyway.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    ........ i wouldn't know how many iterations of the subform to display.
    I don't understand what you mean by this.
    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
    TiliaTree is offline Novice
    Windows 8 Access 2013
    Join Date
    Aug 2014
    Posts
    6
    sorry - simply if the number of rooms was three then I'd display the data collection sub form three times, but as i wont know that info I don't collect it before hand I cant do it. All sounds as though its easier to just keep asking them " is there another room".
    Thanks again.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by TiliaTree View Post
    sorry - simply if the number of rooms was three then I'd display the data collection sub form three times, but as i wont know that info I don't collect it before hand I cant do it. All sounds as though its easier to just keep asking them " is there another room".
    Thanks again.
    Yes I agree. Keep asking them " is there another room". You can find out how many rooms there are at any time by using the DCount() function.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 5
    Last Post: 11-30-2014, 12:46 PM
  2. Replies: 1
    Last Post: 07-24-2014, 04:48 PM
  3. Replies: 2
    Last Post: 08-07-2013, 07:44 AM
  4. Replies: 16
    Last Post: 06-20-2013, 09:25 AM
  5. Open 1 of 2 Forms based on Criteria
    By DCV0204 in forum Forms
    Replies: 28
    Last Post: 11-23-2011, 03:09 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