More issues with forms/subforms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. Here's my dilemma: I have a subform that is based on a query. The
query runs great when you run it by itself. It pulls some info from my main
table and then the last column in the query is an expression computes an
equation for me based on one of the fields in the main form.

Here's what I need the query to do: I have the query pull the person's last
name, first, rank, job title, and the date they entered training in Short
Date format. The last column contains a properly written expression that
adds 15 months to the Date Entered Training column for each individual so
that we know each person's 15-month deadline way ahead of time.

When the query runs by itself, it works fine, dispalying the corect value
for each individual. When I create a form based on this query, it also runs
fine, displaying the right value, exactly 15 months to the date they entered
training. When I run a report based on this query, it runs fine as well.
But when I put the form in as a subform, for some reason the last field
(Expr1) containing the expression doesn't show the right date. It shows the
same date as in the Date Entered Training form, and the correct value should
be 15 months to the day from Date Entered Training.

I can't seem to fix this on my own, and I have exhausted my resources. Can
anyone help? Thanks.

- Rick
 
Rick, to me the critical info is 'computes an equation for me based on
one of the fields in the main form'. If that is correct, then when you
say later that it 'runs by itself', what you really mean is 'it runs by
itself with the main form active displaying a valid Date Entered
Training value.'

If that is true, then it is hard to diagnose why this is failing as a
subform, but sometimes the way to fix a problem is simply to bypass it.


I would suggest rewriting the query so it pulls the Date Entered
Training value directly from its source table, and not the form.

-Ken
 
Oh, it was a typo: the query IS working based on the main table. So my
correct wording should be that the query 'computes an equation for me based on
one of the fields in the main TABLE'. Darn it. Any ideas? Read the start of this thread and use this sentence to amend the obviously wrong one. Thanks, sorry everyone!

- Rick

P.S. Still need help....read start of thread....thanks.
 
Back
Top