tootman
04-22-2001, 03:20 PM
I have set up a form that keeps track of training for a group of people. Depending on the position, these people have a certain number of days to complete training. Each has a start date, which varies, and there is a list of courses. I have made a query that has the position,and number of days in it. What I am trying to do is this: When I select the position from the combo box, I want the Deadline field (on the form) to calculate the Deadline date based on the number of days for training. Anyone have any ideas? I am stumped.
Jack Cowley
04-22-2001, 04:47 PM
If the startdate is on the form and your combo box has the number of days as the second field then code similar to this in the After Update event of the combo box should produce the desired results:
Me![Deadline] = Me![StartDate] + Me![ComboboxName].column(1)
tootman
04-22-2001, 06:48 PM
Okay, I think I got it but what does the Me! stand for, I keep getting an error stating that the Me is not an automation object?
Jack Cowley
04-22-2001, 08:03 PM
Me is a short cut for [Forms]![FormName]. Or you can say the Me represents the current form. Be sure that you have the correct spelling and names for your Fields and your combo box. You can type Me. and after you type the period Access should give you a list of field names and other events that can be used with the word Me. So your code can look like: Me.Deadline = Me.StartDate + Me.YourComboBoxName.Column(1).
Good luck...