Unbounded Fields, Set in Form_Open

B

BenWeber

I would like to show some sales trends on a form. There is a Salesman table
and a salesman_history table.

I have some weekly data that is visible on a form. I then have some code
that goes through the history records (records #2,3,4,etc) that are available
in the form but not currently displayed and does some calculations of changes
etc... The calculations are NOT simple sums/mins/max's/averages, so i can't
just use a standard function - i have to go thru the recordset via code..

I see 3 options for doing this type of thing:
- Put an unbounded field on the form
- Put something like "0 as stat1" in the select list so that there's a field
in the recordset
- Use labels and just set the caption

When i was first doing step 2, it gave me an error message that something
wasn't updatable when i tried to change the value.

Right now i'm using option 3 successfully, but this doesn't seem like an
elegant solution.

Which option (or another one entirely) is preferred?

Thanks,
-B
 
L

Larry Linson

Unbound Fields, with code to set them in the Form's Load (not Open) event,
seems a reasonable approach. You can't count on Controls being "ready" in
the Form's Open event.

It's possible that you could do this with a combination of Queries, but
there's not enough information here to determine. Query calculations are
pretty much restricted to the "standard" operations that you can do in
Access.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top