additional detail lines in single form

K

KMT

I have a form that has the default view set to 'single form'. What I would
like is to have the date and name in the heading, and in the detail section I
have a line of fields that the users will use to enter tasks, etc. Here is
an example.

Heading:
Date: Name of Employee
Detail Section:
Task Type: Task Name: Total tickets: Hours Worked:

They will be entering multiple task lines within the detail section. As it
is, it just goes to a new record, rather than adding lines to the current
record. If I change it to a continuous form, all the records run together.
I want to be able to add multiple lines on the same form, so the employee
only has to enter date and name once and also so it will add the total hours
worked for them on the form.

What changes do I need to make to allow multiple detail lines on a single
form, yet not make it a continuous form?

Will this also fill in the date and employee name in the table for each
detail line?
Thanks!
 
K

Klatuu

The only way to do that is to use an unbound form and add a lot of code add
or update records in the table.
What I am really saying, is that is a really bad idea. I recommend using
datasheet view, or just using one record at a time.
 
R

Ronald Roberts

KMT said:
I have a form that has the default view set to 'single form'. What I would
like is to have the date and name in the heading, and in the detail section I
have a line of fields that the users will use to enter tasks, etc. Here is
an example.

Heading:
Date: Name of Employee
Detail Section:
Task Type: Task Name: Total tickets: Hours Worked:

They will be entering multiple task lines within the detail section. As it
is, it just goes to a new record, rather than adding lines to the current
record. If I change it to a continuous form, all the records run together.
I want to be able to add multiple lines on the same form, so the employee
only has to enter date and name once and also so it will add the total hours
worked for them on the form.

What changes do I need to make to allow multiple detail lines on a single
form, yet not make it a continuous form?

Will this also fill in the date and employee name in the table for each
detail line?
Thanks!

1. Make a copy of your current form.
2. In the new form remove the header and footer.
3. Change the new form to datasheet.
4. Delete all of the control in the detail section on your current form.
6. Add a subform to the detail section.
7. Change the controls in the header to unbound and remove the
recordsource for the main form.
8. You will need to add code in the header section of the main form
and in the SubForm Form to allow filtering of records when a new
employee is selected and when your subform goes to a new record or
during the OnCurrent event. Also, you will need to allow for user input
error in the header section, such as a date and no employee entered, or
invalid employee.

There is always much more work (code) involved when you are working with
an unbound form. In this case the Main form is unbound and the subform
form is bound to your table.

This is off the top-of-my-head.

HTH,
Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top