Continuous Form Question

JenNorthwood

Registered User.
Local time
Today, 16:07
Joined
Apr 17, 2003
Messages
24
Hi There,

I have a Continuous Form (it is in a subform): Has the following fields:
Person
Date
Course

When you choose the first person, Date, and Course, The next person I choose, the Date and Course stay the same. How do you do this?

EG.
Person Date Course
Jen July 12 Child Care
Liam July 12 Child Care
Tim July 12 Child Care
Jade July 12 Child Care

Thanks,
Jen
 
Sounds like the date and course fields are not bound. Check their controlsource properties and make sure that they point to the correct column.

BTW, if your date field is actually named "date", you would be wise to change it. Date is the name of a VBA function and will cause confusion should you need to write any code that references this field.
 
My fields are bound properly.

When I enter in the first row and enter, the next line is blank like a new record.

I want the Date and Course field to be the same as the first record that is selected.
 
If all the data in a column on the subform is supposed to be the same, you have placed the column in the wrong table. The field should be in the parent table so you don't have to duplicate it.
 
Hi Tried putting the date and course on the parent form, but the parent form is looking up information and I just can't get it to work. I have tried everything I can think of.

I have attached a sample of what I am trying to do.

I want the date and course to be the same for all the people I select

Any suggestions would be great.

Thanks,
Jen
 

Attachments

Just putting the fields on the main form is insufficient. You need to move the fields from the "many-side" table to the "one-side" table. Then change the query that the main form is bound to to include the new columns and finally, add new controls to the main form.
 
Thank you Pat,

I changed it all around so that everything is where it is supposed to be, but now the subform isn't working?? I don't get an error message or anything, but the parent form works.

Please help.

Thank you for your help.

Jen
 

Attachments

subform isn't working??
covers a lot of territory. Start by making sure that the master/child links are correct and that the recordsource query still works.
 
I have looked at everything and I can't figure out how to make the date and course work on the one-side. I don't know if I set it up right or not. Can you please look.

Thanks for all your help.

Jen
 
Too much needs to be changed for me to do it for you. Plus I don't know your business rules.

Start by clarifying your business rules. Can an employee take a class more than once? Are these classroom classes or independent study? This dictates where the date should be stored. Is the course always the same length no matter when someone takes the course. If so, the length needs to go in the table with the course description. It should NOT go in the relation table. The answers to these (and other) questions will tell you which table should contain the date and which should contain the hours. Once you have the fields moved to their proper tables - my guess is time goes with course description and date goes in the relation table, then you can change the form.

While you are in change mode, change the name of the Date field. Never use function names as column or table names. It just causes trouble if you need to write any code.

Once you have the requirements sorted out, download the many-to-many sample db that I posted a few months ago. It is EXACTLY the structure you need.
 
Thank you Pat,

Your suggestions worked. I now have it working. Only one last question. I get an error when I try and input more the one course right after one another. I believe all it needs is a requery, but where would I put it? THe error occurs on the lookup combo

Set rs = Me.RecordsetClone
rs.FindFirst "[TraningID] = " & Str(Nz(Me![Combo4], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Thanks for your help.

Jen
 
Last edited:

Users who are viewing this thread

Back
Top Bottom