help in linking main form with subform

mikarsen

Registered User.
Local time
Today, 08:09
Joined
Sep 12, 2006
Messages
17
Hi, I need help with regards to linking the subform to the mainform. I'am creating sample survey in access. I have a subform that would list the questions on the survey. The subform runs fine and displays the questions that are to be answered. However, when i tried linking the subform to the main form, the subform did not show the questions.

I've attached the compressed mdb file for reference.

Thanks in advance for those who can help me.
 

Attachments

The questions are not going to show until you add them.

I think it's not going to work exactly as you think it should and you are going to have to do some work to get them to display. First of all, you need to have code to add all of the questions as new recordsto the subform when a new main record is created. Then, requery the subform and then the questions will appear.
 
Hi Bob

I've realised that I'm trying to do the same thing in my database and struggling with what to do:

http://www.access-programmers.co.uk/forums/showthread.php?t=203171

Is there no other way around this? I had my table designs checked by other people and they were happy that the design was good. So I figured the form would be easy to put together.

Do you think I need to redesign my tables? :(

I have attached my DB to that post in case you wanted to take a peek.
 
When you link by the id field and they haven't created any responces you don't see any questions. I think you need to show every question then update the responce table. As it sits they will never see question to answer if they haven't entered any responces. hope this helps
 
all that is really needed in both cases is to populate a Table with the Questions with an update Query.

Simon
 
Assumeing that everyone will answer all questions but will only see their responces. Here is what I did. I removed the link from the main form to the subform. Then use the query subform query to get responces for only that person. I think in answer to the original question don't link the forms, What ro you think? .
 
You are quite correct. There are two solutions one yours that creates separate queries and forms for each section. That is actually thinking out of the box. I used another method just to try and see if it worked. I created a control for each section of the parent and then linked Tabbed Section's subform with the appropriate parent control.

Simon
 

Users who are viewing this thread

Back
Top Bottom