Navigation Buttons

ghudson:

Yes, I believe everything is in the right place. I copied your code and pasted it. All my objects are the same as yours. I depicted everything that you had on your MouseTrap sample.

Attached is my db so that you can see what I'm talking about.

The main form to open is frmTONumber.
 

Attachments

I think the problem is the record source of your form and subform. What records should the subfrom buttons in the bottom right corner be moving?

The record source of the frmTONumber form is the tblTONumber table.

The record source of the frmTOItemsform is the tblTOItemstable.

The subform records should be linked to the current record on the main form [usually]. Since I do not know exacty what you are trying to do I do not know how to guide you. I can say that the record selectors and record X of Y counts are correct when I open those two forms individualy.
 
ghudson:

Yes that is what I wanted and what I thought was going on.. that the subform records are linked to the current record on the main form. Can you guide me in the right direction to obtain that.

I used the wizard to add the subform so I guess that may be my problem.
 
The subform records must be linked to a record on the main form. Like an employee number or what ever is used as the key field [primary key] on the main form. That way the sub form will only show related records to the current record on the main form. The wizard should help you build it.

Look at the Northwind.mdb sample db that came with your Office Pro installation. Check out the "Customer Orders" form. It has a subform "Customer Orders Subform2" linked to the current [selected] record in the main form.
 
ghudson:

I took a look at the northwind database as you advised.

The Customer Orders form's record source is to Customers Table
My main form frmTONumber record source is tblTONumber

The Customer Orders Subform1 record source is to Orders Table
My subform record source is tblTOItems

The Customer Orders Subform2 record source is to a Query
So I created a query from my tblTOItems and added the primary key (TONumber) from tblTONumber to the query.

I tried mutliple things but no avail. I still get 1 of 1
 

Users who are viewing this thread

Back
Top Bottom