Filter subform(s) on opening/loading Main form

331

Registered User
Local time
Today, 15:15
Joined
May 24, 2006
Messages
20
Hello All,

RE: Filter subform(s) after Main Form opens/loads

WHAT I'D LIKE TO DO: When the main form is initially opened, each of the subforms will be blank forms, yet the User will have the ability to scroll through to previously submitted data on the subform(s).

WHAT I'VE TRIED: Have searched for this topic and not found code I can use. Have tried lots of things, a few of which are (DoCmd.GoToRecord , , acNewRec), setting the Filter On Load property to Yes, and then entering criteria. Nothing works. :rolleyes:

Can anyone provide guidance and code (and where to place it)?
I'm attaching a sample database.

Thank you for whatever help you can provide!
 

Attachments

Hi Adam,

The main form that opens with various option buttons is named: [frmMainMenu]

Then, the main form that contains the subforms is named [frmStaffTransactions]
Connected to this [frmStaffTransactions] is a tabbed view, with several forms such as [frmCreditCardStatements], each having at least one subform such as [sfrmCreditCardEntries]. Right now, [frmStaffTransactions] opens to the specific employee selected thru a combo box on the [frmMainMenu]. All that employee's data is now available. However, I want the forms attached to [frmStaffTransactions] to open to a blank form, with the ability to scroll thru their previously entered data.

Thanks for your help.
Paula
 
Right now, [frmStaffTransactions] opens to the specific employee selected thru a combo box on the [frmMainMenu].
Actually, it doesn't. The recordsource for the main form does not have any criteria linked to it, as the SQL statement indicates.
All that employee's data is now available.
Maybe in the subforms it is, but not in the few controls that are located in the main form.
However, I want the forms attached to [frmStaffTransactions] to open to a blank form, with the ability to scroll thru their previously entered data.
When you say "attached forms", you mean "subforms of the main", correct? I hope you do, anyway.

Why do you want to do this? What's the purpose? Just some ease for the end user? If you want to see a blank form for each of the subs on the main, write a docmd.gotorecord command behind each of the forms when they are loaded. If that doesn't work, maybe put the command behind the timer event with a very low timer interval. That's about the only idea I've got here...
 

Users who are viewing this thread

Back
Top Bottom