rushB
08-03-2020, 12:07 AM
Hello there,
I am making my first database and running into a small problem.
I created two tables which are linked via a 1:n relationship. In a form I took the main table and created a combo box with the values of the second table. Now I want that when the enduser picks a value from the combobox, Access calculates the next date. So for example when I chose "High Risk" Access will take the date ented in the box " Last Review Date" and put this value + 1 year in the field " Next Review Date"
for this I created a after update procedure
if Me.CRRB_ID_F = " High Risk"
Me.Basic_NRDate = Me.Basic_LRDate + 365
End if
if Me.CRRB_ID_F = " Medium Risk"
Me.Basic_NRDate = Me.Basic_LRDate + 720
End if
I hope someone could help me there
Stay safe
I am making my first database and running into a small problem.
I created two tables which are linked via a 1:n relationship. In a form I took the main table and created a combo box with the values of the second table. Now I want that when the enduser picks a value from the combobox, Access calculates the next date. So for example when I chose "High Risk" Access will take the date ented in the box " Last Review Date" and put this value + 1 year in the field " Next Review Date"
for this I created a after update procedure
if Me.CRRB_ID_F = " High Risk"
Me.Basic_NRDate = Me.Basic_LRDate + 365
End if
if Me.CRRB_ID_F = " Medium Risk"
Me.Basic_NRDate = Me.Basic_LRDate + 720
End if
I hope someone could help me there
Stay safe