klallen810
Registered User.
- Local time
- Yesterday, 22:42
- Joined
- Jul 18, 2012
- Messages
- 15
Hello,
I am working on a nutrition tracking database and would like to have a form that updates my “Goal Weight” Table, so I don’t have to type in every day, and every number. Basically, I have a form and a subform. The subform is a datasheet from the GoalWeight Table. It is currently empty. At the bottom of the form I have a text box for Date and Weight. I would like to be able to enter today’s date and today’s weight and then have the table populate. Basically, I would like to lose .2 lbs/day until I reach 125 lbs. So let’s say that today is 12/4/2012 and I weight 135 lbs. I would like to be able to put 12/4/2012 in to the Date text box and 135 into the Weight text box, then click “Update” and have the table look something like this:
ID Date Weight
1 12/4/2012 135
2 12/5/2012 134.8
3 12/6/2012. 134.6
Etc. until the Weight reaches 125. Also, if the weight at a particular date changes, I would like to be able to update the table with the new information. I thought of using an append query with the DateAdd function, and then writing some VBA code that will run this query, adding one day, and subtracting .2 lbs, until the goal weight is reached. I have a good working knowledge of Access, but am fairly new to VBA. Please let me know if you have any ideas! Thanks!!
I am working on a nutrition tracking database and would like to have a form that updates my “Goal Weight” Table, so I don’t have to type in every day, and every number. Basically, I have a form and a subform. The subform is a datasheet from the GoalWeight Table. It is currently empty. At the bottom of the form I have a text box for Date and Weight. I would like to be able to enter today’s date and today’s weight and then have the table populate. Basically, I would like to lose .2 lbs/day until I reach 125 lbs. So let’s say that today is 12/4/2012 and I weight 135 lbs. I would like to be able to put 12/4/2012 in to the Date text box and 135 into the Weight text box, then click “Update” and have the table look something like this:
ID Date Weight
1 12/4/2012 135
2 12/5/2012 134.8
3 12/6/2012. 134.6
Etc. until the Weight reaches 125. Also, if the weight at a particular date changes, I would like to be able to update the table with the new information. I thought of using an append query with the DateAdd function, and then writing some VBA code that will run this query, adding one day, and subtracting .2 lbs, until the goal weight is reached. I have a good working knowledge of Access, but am fairly new to VBA. Please let me know if you have any ideas! Thanks!!