I'm having a slight problem getting my head arounf the following...
I have a form called FrmStartUp, with a invisible subform called FrmPasswordSub.
FrmStartUp has three combo boxes on it: CboRole, CboName, & CboArea.
CboRole has its content taken from TblRole, which contains RoleID (PK) and RoleName (Text)
CboName has its contents taken from TblName, which contains NameID(PK) and Surname (Text) & Forename (Text)
CboArea has its contents taken from TblArea, containing AreaID (PK) and AreaName (Text)
FrmPasswordSub has a text box, TxtPassword and a combobox, CboArea. TxtPassword is used for entering a password which gets checked in code. CboArea has a list of areas (Geographical), this data is taken from TblArea which contains AreaID (PK) AreaName (Text).
When the user goes into FrmStartUp they are shown CboRole only & some Command buttons, CmdEnter & CmdExit. They then select a role from the list , RoleID's of 1,2 & 3, text visible only.
If RoleID = 1, FrmPasswordSub is displayed. The user then enters the password in TxtPassword, and selects an area from CboArea. They then click on CmdOpenMain (In frmPasswordSub) which opens the main form.
If RoleID=2, CboName is displayed where the user selects a name. They then click on CmdEnter and FrmMain is opened filtered on NameID in TblMain.
If RoleID=3, Same as role 1, different text,
I have got somewhat confused and I'm not too sure the best way to filter records in FrmMain based on the above criteria. Basically RoleID 2 should have limited access and be able to search by name only. The other roles can search by area.
I will need to filter reports on this as well as other comboboxes once in the main database.