Wrong rows being updated

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

Guest

I have a Form that has 2 combo boxes 1 for user ID and the 2nd for a week
start date. Both are values of tbl 1. I have a subform that is in a
datasheet view that has links set up for a match on the 2 combos of the main
form. Everything work great while viewing the data. All links work without
a problem. The problem occurs when I add a records using my sub form based
on the selected combo's of the main form. I have Specific row (first one
ever quiered) that continually get's updated based on values used in my combo
boxes.

I hope this all makes sense. Any questions feel free to ask
 
The subform filters the records it displays based upon the fields you specify
in its 'LinkChildFields' property. Any new records entered into the sub-form
must also meet these criteria to be visible, you'll find that those same
fields for new records default to the values contained in the fields/controls
you specify in its 'LinkMasterFields' property. The behavior you've
described is consistent with the purpose of a 'linked' sub-form.

If you want to enter records into the subform that are unrelated to the
values in the combo boxes on the main form you'll have to clear the
LinkMasterFields and LinkChildFields properties of the subform, which will
effectively display all records in the subform's recordset. To supress those
you could use the subform's 'dataentry' property to view only the new record.

Forms!mainForm!subFormControlName.LinkMasterFields = ""
Forms!mainForm!subFormControlName.LinkChildFields = ""
Forms!mainForm!subFormControlName.Form.DataEntry = True

Hope I haven't misinterpreted your issue. Good luck.
 
It actually the exact opposite. My updates should be forced the same as my
main form combo's, but I have a row that is un related that gets updated
ALSO. based on the values of the combo boxes.

I want to think is related to some form of "query reset"
 
Here's the senerio...

Open form and Initial values that appear...

cust 1 (main form)

order1 (subform)
order2(subform)

If I select a different customer..

cust 2(main form)
order 3(subform)
order 4(subform)

If I look at the table the cust1 order1 gets changed to cust2

I hope this helps explaining my situation
 
Back
Top