I’m using Access 2003 on Windows XP.
I have a Mainform (Staff Entry) which displays an unbound combo box named ChooseStaff. The Row Source for this combo box is a SELECT of the UserIDs and Staffer Names from a table (Staffers) which contains staffers’ names and other info.
When the user actually selects a Staffer Name from the dropdown combo box, the VBA routines for the combo box’s On Enter and After Update events take care of finding and displaying the appropriate records in the Subform (Report Entry) from a table (Status Reports) which contains reporting information – where UserID in Staffers table matches UserID in Status Reports table. This works fine.
The problem arises when the Mainform is first displayed. The combo box is shown as empty but the Subform displays the records for the first UserID in the underlying table Staffers. If the user goes directly to the Subform and starts entering/modifying data, the Status Report records for the staffer that matches the first UserID are the ones that get modified, even though the user hasn’t even selected a staffer from the combo box.
What I want to happen when first entering the Mainform is to show a blank/inaccessible Subform until the user has selected a staffer from the combo box and the VBA routines have displayed the matching info in the Subform (i.e., force the user to make a selection first). I’m guessing some code should be written for the Mainform’s On Open event, but I’m not very experienced in Access and am at a loss.
Appreciate any help with this. Many thanks.
Janice