fraser_lindsay
Access wannabe
- Local time
- Today, 03:36
- Joined
- Sep 7, 2005
- Messages
- 218
Hi,
I am trying to add a new interim 'startup screen' on my DB. This new form is unbound and has a combo box on it, the record source of which is 'BusinessName'.
In my database I have two main user forms that are used frmEmployeeDetails' and 'frmJSA'.
I would like the DB to filter all of the records in the database by whatever the user selects on the new startup form.
So for example, the user selects 'Company A' form the drop down and when they browse the employee details or JSA records they only see records linked to Company A.
So they click the company in the combo that filters the DB and then automatically loads the main Switchboard which allows them to browse the employee details and JSA forms etc.
I have made a start which doesn't work. This code is applied in the 'after update' of the startup form combo box.
I have a feeling this may be more complex than I am assuming.
Can anyone help please?
I am trying to add a new interim 'startup screen' on my DB. This new form is unbound and has a combo box on it, the record source of which is 'BusinessName'.
In my database I have two main user forms that are used frmEmployeeDetails' and 'frmJSA'.
I would like the DB to filter all of the records in the database by whatever the user selects on the new startup form.
So for example, the user selects 'Company A' form the drop down and when they browse the employee details or JSA records they only see records linked to Company A.
So they click the company in the combo that filters the DB and then automatically loads the main Switchboard which allows them to browse the employee details and JSA forms etc.
I have made a start which doesn't work. This code is applied in the 'after update' of the startup form combo box.
Code:
Private Sub BusinessSelector_AfterUpdate()
DoCmd.OpenForm ("Switchboard")
frmJSA.Filter = "" & Me.BusinessSelector
frmEmployeeDetails.Filter = "" & Me.BusinessSelector
Me.FilterOn = True
End Sub
I have a feeling this may be more complex than I am assuming.
Can anyone help please?