Limit # of sub-form records - Calculation errors

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

Guest

Hi all,

I sincerely hope this makes sense to someone, as I'm at a complete loss as
to how to solve this problem. (However, I'm relatively new to Access and have
found some great help on this site so I'm eternally optimistic!)

I have a main form [frmactivities] which uses a hidden sub-form
[frmsubtotals] to run some calculations on the main form. The sub-form is
based on a query and gets it's source data from multiple locations, based on
selections that users make in the main form. This all works fine, except
occasionally I get calculations that don't make sense based on the selections
entered on the main form.

I just discovered that the sub-form for each record actually has two
sub-form records in it (I'll call these sub-records for lack of a better
descprition). So, when I make the sub-form visible on my main form, I can
actually toggle between the first and second sub-records in the subform.
Several fields within the sub-records have differing values, even though they
are based on the same (main form) record.

The only thing I can think of that happened is that users are able to
over-ride certain default values via another form [frmdefaultoverride] linked
to the main form [frmactivities] and toggling these over-rides on and off has
created multiple sub-records.

Like I said, I hope this all makes some sense. In short, I think I just need
to figure out how can I limit my sub-form so there is only one sub-form
record per main form record. Please help!
 
Hi all,

One other note I just discovered. I think my over-ride theory is correct,
because I just discovered that one record is using the over-ride values of
another record that uses the same catagory within the main form. Somehow I
need to tie the over-ride form, which over-rides the default values of the
category, directly to the specific record in the main form. (I'm using an
auto-number primary key in the record and over-ride form, but something is
getting crossed-up here...)

Any suggestions greatly appreciated!
 
Back
Top