Full Version: Iff Statement Execution
UtterAccess Forums > Microsoft® Access > Access Forms
santhoshalex
Query regarding execution of iff statement
able with entries : Date ; Employee; Manager; Supervisor; Teller; Name; Empid
On the form data entries are for
Date :
Employee : (this shud give a pull down Menu of Manager, Supervisor, Teller)
Once you select Manager, In the name field another pull down menu shud come down with all Managers Name
Once you select Supervisor, In the name field another pull down menu shud come down with all Supervisors Name
Once you select Teller, In the name field another pull down menu shud come down with all Tellers Name
When you select the Managers or supervisors or Tellers name their Empid shed be displayed.
Please let me know how to proceed.
Thanks
Alex
ChrisBu
You want a combobox for employee with RowSourceType set to 'Value List' and RowCource "Manager";"Supervisor";"Teller"
When have a second combo box for emplyee names
CAn AfterUpdate event on the first combo box which changes the RowSource of the second as appropriate e.g.
combo2.rowsource = "Select * from emplyeetable where employeetype = '" & combo1 & "'"
combo2.requery
It depends on what is your data source for the list of employees!
you can also make the id field visible or not , in the same event, depending on the selection of combo1 e.g
if combo1 = "Teller" then idfield.visible = false else idfield.visible = true
RJD
Hi Alex: In case you need a working model of what you are trying to do, here's something specific to your requirements. It uses a slightly different approach than ChrisBu to limiting the employee names (On Got Focus for the employee combobox), but accomplishes the same thing. And it actually doesn't use an IIF statement as such (see the queries).
TH
Joe
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.