Link Master/Child fields, Suddenly sets it's own value in design ?

liamfitz

Registered User.
Local time
Today, 15:59
Joined
May 17, 2012
Messages
240
Has this happened to anyone else ? Main and subform working normally - the latter having a linked field to the mainform, and changing it's recordset accordingly on moving through the recordset. Then, what appears to be only one or no records showing on subfrom. On checking the SQL/Design Grid of subform's query, it has 'automatically adopted' a selection criteria on linking field, say Client_ID now set to 83, 11 or any other existing ID No. ??? Any help appreciated.
 
That sounds like a persistent filter. Are you using any code to set filters? Also, when closing the form are you using anything like:

DoCmd.Close acForm, Me.Name, acSaveYes <------ where this should be acSaveNo

because acSaveYes tells Access to save design changes, which include filters. It has nothing to do with saving records.

It can also occur if you have the form open when testing and then make a change to code while the form is open and then save the code, it will also save the filter.
 
Thanks for reply. No I haven't. I have checked all Filter properties in forms ( I did try setting one in the past ), but it caused the same difficulty, when I tried to overwrite it dynamically - so took it, and all Property-set filters, out. The only other 'filter' on this ( or any other form ) is from a combo box, which works using a FindFirst filter on the recordset ( same P.K. field though ). I don't use ANY DoCmd.Close commands.
 
Well something is causing the query to have criteria and then saving it. That is what you need to find. You aren't using any code to set the record source of the subform are you?
 
So far it's working well again. Will monitor, and bear in mind your advice. Thanks.
 
Hello for all , I'm engineering my specialization is software engineering
 

Users who are viewing this thread

Back
Top Bottom