Solved Continuous Sub-Form (1 Viewer)

Tophan

Registered User.
Local time
Today, 14:57
Joined
Mar 27, 2011
Messages
374
Good afternoon and Happy New Year!

I am working on a hotel project and created a continuous form listing all the tasks that need to be completed for the guestrooms with a Yes/No field. Each room will have the same tasks. I would like this form to be a subform where the main form will have approx. 4 fields - the primary key/autonumber field which will link to the subform; a date field, floor level field and room number field.

I've been reading different articles on how to create a continuous sub-form but have had no luck. I'm hoping someone on this forum can direct me on how best to achieve this.

Thanks in advance for your assistance.
 
I suggest you post a sample database or at least a few screenshots of the database schema and the continuous form you created. Assuming things are correctly setup, you would link main and continuous form via master/child links, which is a setting found in the Data tab of your subform control.
 
Suspect the issue is something else since when you create a subform control, you specify your continuous form as the source object.

I’m guessing it is probably an issue with your tables and relationships
 
Thanks - I'll check again. I'm at the beginning stages of the DB so it's not too late to make any corrections.
 
Thanks - I'll check again. I'm at the beginning stages of the DB so it's not too late to make any corrections.
Can you post a screenshot of your Relationships Diagram?
 
but have had no luck.
Describe the actual problem, for instance...

• you take action A
• you observe outcome B
• outcome B is not acceptable because of criteria C

Using a pattern like that to describe a problem will improve your luck.
 
There is only a single form object in Access. It shows either one record or multiple records in either continuous or datasheet view. The single form object may be used to add/change/delete records. It may be used as a main form or a subform but there is only a single form object. The code in the form is referencing the current record. In the case of the single form view, that would be the record you are looking at. In the case of the multiple record views, it is the record that contains the cursor.

If you post your schema and tell us a little more, I may have a sample that will help you. You would need to define a table that has tasks. And another that has room types because, there really could be different tasks should there be different room types. Then a third table that connects tasks to a specific room type. Then in your AfterUpdate event for the subform that adds a room, you would run an append query that copies all the tasks for the room type for the room you just added and appends them to the RentedRoomTasks table. Now you will have a subform that shows all the tasks for a room with a field to check complete and another comment field so you can add comments about things that are broken or missing or whatever. Then you can create end of day reports to make sure that someone reviews the comments.
 
Good morning. Please accept my apologies for not responding sooner but was I down with a cold for the past few days. As suggested, I double-checked the relationships and I think I managed to get the form to work.

I'm still going to attach the database for all to see. Note, this is at the very beginning stages as I started over so it doesn't look very presentable right now 😁

Let me know what you guys think and if you have any suggestions that would prevent errors in the future.

As always, thanks for your feedback and assistance!
 

Attachments

Good morning. Please accept my apologies for not responding sooner but was I down with a cold for the past few days. As suggested, I double-checked the relationships and I think I managed to get the form to work.

I'm still going to attach the database for all to see. Note, this is at the very beginning stages as I started over so it doesn't look very presentable right now 😁

Let me know what you guys think and if you have any suggestions that would prevent errors in the future.

As always, thanks for your feedback and assistance!
Hi
Your tblCheckListDetails which is the many side of the Relationships contains 58 Records with no Parent Records.

This is not how you would manage your process.

You should initially enter a record in tblCheckList and then add related records in tblCheckListDetails.

Looking at the data in tblCheckListDetails I believe you need to use what is kmnown as Cascading Combobox's.

If you select the "Trade" = "MEP" with Combobox1 then in a second Combobox you would only see Items which are related to "MEP"
Is this correct?
 
Hi. I would like to see all items so as to ensure nothing is missed.

The current format is what I want to see, however, I tried entering some test data but the subform is not picking up the ChecklistID field from the main form.

Please also note that the order of the checklist is following the order of how the works are to be carried out on site which is why I would like to see the entire list per room.
 
Hi. I would like to see all items so as to ensure nothing is missed.

The current format is what I want to see, however, I tried entering some test data but the subform is not picking up the ChecklistID field from the main form.
Hi
Sorry but you are not following what I am recommending.

You cannot add data to a Continuous Form until you add a Record in the Main Form.

Pat Hardman has pointed you to a solution but you need to get this First Major Step created before you can add the Multiple Items.
 
Ok...just re-read his thread. I think I have an idea of how to do it so I will try again and reupload the DB for you to check. Thanks!
 
Ok...just re-read his thread. I think I have an idea of how to do it so I will try again and reupload the DB for you to check. Thanks!
You need to set the link fields correctly, or populate the fields yourself on New Record.
1736177338591.png
 
Ok...just re-read his thread. I think I have an idea of how to do it so I will try again and reupload the DB for you to check. Thanks!
Hi
There will probably be a better way of doing this but this is one way of doing what you want.
On the Form that opens when you use the "Trade" Combobox and select a Trade, then all related Items will be inserted into the Subform.
 

Attachments

Oh wow! Thank you. I will have a look at it. I was just reading about nested continuous forms to see if that's what I want but I will definitely try your form to see if that works for me.

Thank you so much.
 
Oh wow! Thank you. I will have a look at it. I was just reading about nested continuous forms to see if that's what I want but I will definitely try your form to see if that works for me.

Thank you so much.
Hi
My apologies but I missed the fact that you want all items to be added in the order that they were in your tblChecklistDetails.

I have modified the process so that now you just click on the Command Button "Add All Items"

Does this suit?
 

Attachments

Hi
My apologies but I missed the fact that you want all items to be added in the order that they were in your tblChecklistDetails.

I have modified the process so that now you just click on the Command Button "Add All Items"

Does this s

Good morning.

This is exactly what I need. Thank you so much for your assistance; it is greatly appreciated.

I added an "Add New Record" button to create a new clear form as well as some combo boxes to select the floor level and room type.

Thanks again!
 
Good morning.

This is exactly what I need. Thank you so much for your assistance; it is greatly appreciated.

I added an "Add New Record" button to create a new clear form as well as some combo boxes to select the floor level and room type.

Thanks again!
Glad to help
 

Users who are viewing this thread

Back
Top Bottom