Re: Access 2003 forms lookup problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Well, you can't get the correct data to show on the form unless the correct
data is in the table. If you want the form to display data from more than
one column in the combo box, that can be done. Place a textbox next to the
combo box and set the textbox's control source to an equation that points to
the column of the combo box you want to display.

Example:
=cboMyCombo.Column(1)

The index number for the Column property is zero based, so 0 is the first
column, 1 is the second, etc. While you can display multiple columns in the
drop down list, once a selection has been made, the first visible column
will display in the combo box, you can use the above example to display
other desired columns. Once you have a unique value stored, you will get the
correct value back instead of the first one with the same calorie content as
you were getting.

To get the sum from this, use a query with the form's record source and the
lookup table with the food and calories linked together. Use DSum() to
retrieve the sum of the records for that day.

One possible setup for all of this would be a main form with the day and sum
information and a subform with the multiple food entries for that day.

--
Wayne Morgan
MS Access MVP


"FrankSpokane" <FrankSpokane@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:40DD7935-1823-4A6A-B5B2-3147FBB4780D@xxxxxxxxxxxxxxxx
>I think we might be talking about 2 different things - you're talking about
> getting the right info in the table and I'm talking about getting the food
> and calories to show up onscreen in the form - so I can visually see them,
> and I have it summing the daily calories.
>
> I'm sure I have a much lower-level view than yours.
>
> Thanks for all your help and examples as I have worked through each and
> learned a lot about combox boxes, cound columns, and column width
> adjustment.


.



Relevant Pages

  • Re: Calories and calories
    ... units are in calories or Calories... ... All cycle and hrm's I've seen display in kCals. ... over the exercise period. ...
    (uk.rec.cycling)
  • if then elif
    ... The problem is, it's displaying all of the possibilities even after you enter a 0, or if the fat grams are more then the total number of calories, that is supposed to stop the program instead of continuing on with the print statements that don't apply. ... print "Your food is high in fat." ... #Display percentage of calories from fat ...
    (comp.lang.python)
  • Re: Calories and calories
    ... units are in calories or Calories... ... Near walking pace that's 300 kcal/hour, ... On a rowing machine with a Watt display this is consistent: ... and over 300W is pretty hard work even for a short ...
    (uk.rec.cycling)
  • Re: Wiggle delays
    ... It also doesn't display average speed, pace arrow or calories used, although ... the latter is a bit pointless IMO. ... The Velo display is quite large but somehow still mananges to be difficult ...
    (uk.rec.cycling)
  • Re: if then elif
    ... The problem is, it's displaying all of the possibilities even after you enter a 0, or if the fat grams are more then the total number of calories, that is supposed to stop the program instead of continuing on with the print statements that don't apply. ... print "Your food is high in fat." ... #Display percentage of calories from fat ...
    (comp.lang.python)