Hello,
I need a little help. I need to create vba code that will print a report a report dependednt on value within field. If field "form" has a value of 1 , print report 1 if field "form" has a value of 2, print report 2, and so forth. There are 5 reports and the value in field form are listed 1-5. The reports are based on a query where they have to enter the employee id (pk). Then it needs to print out based on the value. I thought a case statement would be good but I cant get the right syntax to get it going.
Database Employee
Tabble: Employee
Fields:
Employee ID (pk)
Name
Address
Form Can have Value of 1,2,3,4 or 5
Amount
Query1
Contains all fields from table & criteria (Enter Employee ID)
Report1 (based on Query 1)
Report2 (based on Query 1)
Report3 (based on Query 1)
Report4 (based on Query 1)
Report5 (based on Query 1)
I need a little help. I need to create vba code that will print a report a report dependednt on value within field. If field "form" has a value of 1 , print report 1 if field "form" has a value of 2, print report 2, and so forth. There are 5 reports and the value in field form are listed 1-5. The reports are based on a query where they have to enter the employee id (pk). Then it needs to print out based on the value. I thought a case statement would be good but I cant get the right syntax to get it going.
Database Employee
Tabble: Employee
Fields:
Employee ID (pk)
Name
Address
Form Can have Value of 1,2,3,4 or 5
Amount
Query1
Contains all fields from table & criteria (Enter Employee ID)
Report1 (based on Query 1)
Report2 (based on Query 1)
Report3 (based on Query 1)
Report4 (based on Query 1)
Report5 (based on Query 1)