Sumform

C

Christina

I have a form and a subform. I am able to scroll through the main form and
see all records. I would like to scroll throuh and see all the records on
my subform. Eg record 1 in form has 3 records in subform. I would like to
be able to scroll through all those records when I choose record 1 from the
Main Form.
Please, I need basic instructions.

Thanks
 
J

John W. Vinson

I have a form and a subform. I am able to scroll through the main form and
see all records. I would like to scroll throuh and see all the records on
my subform. Eg record 1 in form has 3 records in subform. I would like to
be able to scroll through all those records when I choose record 1 from the
Main Form.
Please, I need basic instructions.

Thanks

What specific problem are you having? A Subform is just a form, and you can
scroll through its records just like you can a mainform.

A form can be displayed in three different views: Single, showing only one
record, usually with a navigation box in the lower left; Continuous, with
multiple records one above the other, usually with a scrollbar; and Datasheet,
which looks like a spreadsheet and also has a scrollbar.
 
C

Christina

The main form contains employee data. The Sub form contains weekly pay
information. I key one one employee's pay records, choose another employee
from the main form, and key that person's data. If I then choose the
previous employee in the main form, I cannot see the data in the subform. It
is however in the table, but I would like to see it in the form, and edit if
I need to. When I go back to view, the subform shows a blank form, with
number 1 of 1...blank
 
J

John W. Vinson

The main form contains employee data. The Sub form contains weekly pay
information. I key one one employee's pay records, choose another employee
from the main form, and key that person's data. If I then choose the
previous employee in the main form, I cannot see the data in the subform. It
is however in the table, but I would like to see it in the form, and edit if
I need to. When I go back to view, the subform shows a blank form, with
number 1 of 1...blank

See if the subform's Data Entry property is set to Yes. It should be No if you
want to see existing records.

If that's not it, please post the Recordsource properties of the main and
subform (post the SQL if it's a query), and the subform's Master and Child
Link Field properties.
 
C

Christina

Sorry I am not sure what you mean by record source properties. The main form
inputs data into the employee records table. The subform inputs records into
the salary register. The forms are linked by and ID field, which data type
is set to text. The data entry properties for both forms is set to NO. Hope
this information is what you need.

Thanks
 
J

John W. Vinson

Sorry I am not sure what you mean by record source properties. The main form
inputs data into the employee records table. The subform inputs records into
the salary register. The forms are linked by and ID field, which data type
is set to text. The data entry properties for both forms is set to NO. Hope
this information is what you need.

Not quite.

Open each form in design view. Select "View... Properties" from the menu. On
the Data tab select the first row, the Record Source property - this is where
the form gets its data. If it is a Query or a SQL statement, click the ...
icon by it to open a query design window, and select View... SQL. Post the
SQL text here.

If it's a table, please post the relevant fieldnames.
 
C

Christina

The main from gets its records from employee table. Sub form gets its data
from Salaries register. When you say relevant field names, what exactly do
you need. All fields in each table appears on the relevant forms.
 
J

John W. Vinson

The main from gets its records from employee table. Sub form gets its data
from Salaries register. When you say relevant field names, what exactly do
you need. All fields in each table appears on the relevant forms.

Ok... keep trying here...

What are the Master Link Field and Child Link Field properties of the Subform
control?

What is the Primary Key of each table?

Is the ID field in the payroll table correctly getting the employee ID from
the main form?

What is the Default View property of the subform?
 
C

Christina

Default View property of the subform is Single.

Employee records tab;e has no primary key. Payroll table has an autonumber
as its primary key.

Yes, the ID field in the payroll table correctly gets the employee ID from
the main form.

What are the Master Link Field and Child Link Field properties of the Subform
control? ....Don't quite know how to get this info.
 
J

John W. Vinson

Default View property of the subform is Single.

So you SHOULD see only one record. Is that what you want? can you use the
navigation buttons to go from one payroll record to the next?
Employee records tab;e has no primary key. Payroll table has an autonumber
as its primary key.

A table with no primary key isn't really a table - it's a heap of data. What
would keep you from assigning two employees the same EmployeeID? If the
EmployeeID is unique (occurs only once in the table) and stable, why not
simply make it the primary key?
Yes, the ID field in the payroll table correctly gets the employee ID from
the main form.

Well... it apparently doesn't, since you can't see the records.
What are the Master Link Field and Child Link Field properties of the Subform
control? ....Don't quite know how to get this info.

Open the mainform in design view. Select View... Properties to view the
properties of the selected object. Click the *edge* of the subform control (to
select the Subform object - rather than the form or some control inside that
control. Its properties should be visible.
 
C

Christina

I can use the navigation button to move from one record to the next in the
main form. I cannot use the navigation button on the sub form. It only
shows 1 of 1, although there are records in the payroll table. However the
child link field shows up the data from the master field. , which is the
ID...I dd make the ID field in he employee records the Primary Key. I am
still trying to get the properties for the child link fields
 
J

John W. Vinson

can use the navigation button to move from one record to the next in the
main form. I cannot use the navigation button on the sub form. It only
shows 1 of 1, although there are records in the payroll table. However the
child link field shows up the data from the master field. , which is the
ID...I dd make the ID field in he employee records the Primary Key. I am
still trying to get the properties for the child link fields

Open the master table, the employee table. Find an ID. Write it down on paper.

Open the child table, the payroll table. Use the funnel icon on the toolbar to
filter it by *that ID*.

Do you see multiple records in the payroll table for that ID?

Now open the main form. Find that same ID.

What do you see on the subform? If you click the >> "go to last" icon on the
subform navigation buttons, does it still say 1 of 1?
 
C

Christina

Followed your instructions. Still 1 of 1.

John W. Vinson said:
Open the master table, the employee table. Find an ID. Write it down on paper.

Open the child table, the payroll table. Use the funnel icon on the toolbar to
filter it by *that ID*.

Do you see multiple records in the payroll table for that ID?

Now open the main form. Find that same ID.

What do you see on the subform? If you click the >> "go to last" icon on the
subform navigation buttons, does it still say 1 of 1?
 
J

John W. Vinson

Followed your instructions. Still 1 of 1.

I'm baffled, Christina. If the data isn't confidential, could you compact and
repair your database and zip it, and email it to me? jvinson <at> wysard of
info <dot> com. There's something that isn't getting communicated here about
either your table relationships or the nature of the form.
 
J

John W. Vinson

Once you mentioned... "as I asked last Friday..." I went a lookin' and low
and behold here it is! As I said... sorry!

Hey! You're doing fine; it's Christina who started two independent threads.
All's well that ends well!
 

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