A
Access infant
I have table that lists all the allowances an employee draws.It also gives
which of them an employee draws during a leave period.
EmpID Leave period Allowance status
1 01-01-2008 to28-02-2008 House rent -1
1 01-01-2008 to28-02-2008 compensatory -1
1 01-01-2008 to28-02-2008 conveyance 0
1 01-05-2009 to31-05-2009 House rent -1
1 01-05-2008 to28-02-2009 compensatory 0
1 01-05-2009 to28-02-2009 conveyance 0
These Allowances could differ from employee to employee and also from leave
period to leave period.
Now i want to display these details of the employee(in the parent form) in
the following manner in a continous subform.
leave period houserent compensatory
conveyance
01-01-2008 to28-02-2008 checked checked not
checked
01-05-2009 to31-05-2009 checked not checked not
checked
I created unbound check boxes(a maximum of ten controls is more than enough
for the purpose)and write the following code.
'I open a recordset here on the above-shown table
rst.movefirst
'I supply the no. of allowance here
AllowanceCount = 3
For x = 1 To AllowanceCount
Forms!Form1."Label"&n.Caption = rst!Allowance
Forms!Form1."Label"&n.Visible = True
Forms!Form1."check"&n.Visible = True
rst.movenext
next
it is working for one leave period(01-01-2008 to 28-02-2008).But i have no
clue how to display the second row to show another leave period(01-05-2009 to
31-05-2009). I feel that to display this way is visually pleasing. So, can
anyone help me how to display this? I will be eagerly waiting for your
replies, friends pleasse give your suggestions.
which of them an employee draws during a leave period.
EmpID Leave period Allowance status
1 01-01-2008 to28-02-2008 House rent -1
1 01-01-2008 to28-02-2008 compensatory -1
1 01-01-2008 to28-02-2008 conveyance 0
1 01-05-2009 to31-05-2009 House rent -1
1 01-05-2008 to28-02-2009 compensatory 0
1 01-05-2009 to28-02-2009 conveyance 0
These Allowances could differ from employee to employee and also from leave
period to leave period.
Now i want to display these details of the employee(in the parent form) in
the following manner in a continous subform.
leave period houserent compensatory
conveyance
01-01-2008 to28-02-2008 checked checked not
checked
01-05-2009 to31-05-2009 checked not checked not
checked
I created unbound check boxes(a maximum of ten controls is more than enough
for the purpose)and write the following code.
'I open a recordset here on the above-shown table
rst.movefirst
'I supply the no. of allowance here
AllowanceCount = 3
For x = 1 To AllowanceCount
Forms!Form1."Label"&n.Caption = rst!Allowance
Forms!Form1."Label"&n.Visible = True
Forms!Form1."check"&n.Visible = True
rst.movenext
next
it is working for one leave period(01-01-2008 to 28-02-2008).But i have no
clue how to display the second row to show another leave period(01-05-2009 to
31-05-2009). I feel that to display this way is visually pleasing. So, can
anyone help me how to display this? I will be eagerly waiting for your
replies, friends pleasse give your suggestions.