How to program Option Group to do this..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Question 1:
Option Group on the Form has three choices: Present, Absent, Absent
Unexcused. It is controlled by the Table Text Field – Attendance. When
selected on the Option Group it records data in 1, 2 or 3, which are
corresponding to the three Option Group choices. How to program so the Table
Text Field records the result as Present, Absent or Absent Unexcused?
Question 2:
The form itself has a Memo field bound to the table form and a numeric field
to enter number of Demerits called Quantity. I would like these fields to be
populated automatically after selecting different options on the Option
Group. I set the Option Group to Present as default and Quantity to 0 as
default.
On Present do nothing, on Absent enter Absent into Memo and Null or Bank
into Quantity, On Absent Unexcused enter Absent Unexcused in Memo and 50 into
Quantity.
Thanks,
JPol
 
Answer to 1:
Why not just store the number 1, 2 , or 3 in your table in Attendance and
have another table with the text related to the numbers for reference when
needed such as reports. Much better design. Change the Attendance field to
and integer.

Answer to 2:
Place this code in the AfterUpdate of the option group:
If Me!Attendance = 3 then
Me!Quantity = 50
End if
 
Back
Top