subform problem

K

Keith G Hicks

Using A2k with Jet.

I've never had this happen before and am lost as to what could be the
trouble. I have a main form (customers) with a subform that shows a list of
the current customer's locations (using Link Child and Link Master to synch
them). Double clicking a location opens up a form for editing that
location's data. When I close the location form all on the location subform
seems fine until I navigate to a different customer. Then all the cells in
the location subform go to "#Name?" on me. I commented out ALL the code in
the pop up locatoin form to see if it was casuing any trouble and it's not.
The source for the subform is just several fields from the location table
and no criteria are set. The source for the popup form is similar except
that I'm using a UDF in the criteria of the CustID column to synch up the
right customer's locations. Any ideas on why when I just open and close the
location popup form without doing anything else then that goofs up the
location subform in the main customer form? I'm stumped.

Thanks,

Keith
 
G

Guest

Make sure that your recordsource is correct. If you are using a query as the
source, open the query and see if you get an error. If you use SQL as the
recordsource, post it or drop it into design view on a query and check it
there.

The code is most likely not the problem, but if you make sure that the
query/SQL is correct, post the code.
 
K

Keith G Hicks

The record source is fine. It works fine for all customers before double
clicking to open the location form. It's when the location form is closed
and then after that navigating in the customer form when the problem occurs.
I decided to completely reset the subform's record source property in code
in the customer form's OnCurrent event. It's not what I'd normally do here
but it seems to have solved the problem.
 

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