Current Record

laurat

Registered User.
Local time
Today, 14:53
Joined
Mar 21, 2002
Messages
120
I have a form based on a table with a multiple field primary key, SO Num and IRR Num. Is there a way for me to allow users to flip through only certain records on a form. Say for example, they only wanted to view the records with the SO Num 123.

The only thing I can think of is to create a report. The user could click a button on the form to take them to the report. Is there a way to have the report automatically open to view all records with the SO Num that the form is currently on?

This approach is a second resort only if there is not a way for them to flip through the certain records on the form. Any suggestions would be greatly appreciated. Thank you
 
Create a query based on the table. In the SO number field put code like this:

[Forms]![MyForm]![MyComboBox]

Create another query based on the same table but only add the SO field. Make it a Totals query.

Create a form based on this query. Add a combo box and set the Row Source to the second query you create. In the After Update event of the combo box but this code.

Me.Requery

Now when the user selects a SO number from the combo box the form will be filtered to show only records with the selected SO number.

Change the names in the criteria field to match the names of your form and combo box.

Another way would be to have form with the combo box and then use code like this in a command button:

DoCmd.OpenForm "FormName", , ,"[SONumb] = " & Me.ComboBoxName

The form in this case can be your current form that is based on the table.
 

Users who are viewing this thread

Back
Top Bottom