I think I somehow created a form the database can't find

J

John Doe

I created a main form with four textbox controls that go to fields in
Table 1.

I created a subform that had one textbox control that goes to a field
in Table 2.

When I go to save a record I use a code module behind the form to
validate each field and everything works OK.

Then I needed to move one field out of Table 1 and put it into Table
2. I created the new field in Table 2 but I did not yet delete the old
field from Table 1. Then I added a new text box to the subform bound
to that new field.

Then I deleted the old control from the main form. Then I modified the
code so it did not look for the old control but instead looked for the
new one I just added to the subform. I structured the syntax exactly
like I used for referring to the first control that was on that
subform and which worked before.

However, when I go into runtime mode the form and subform don't quite
work. So I go into debug mode and stop a few lines after the place
where the code validates the entries in the controls on the subform.
It tells me that it cannot find the controls. Not only that it can't
find the one I just added but it can't find the one that it used to
find before. But it finds the controls on the main form just fine.

I don't know what happened and I was wondering if someone could
suggest some places to start to look.

One thing that might be related...

In the Visual Basic module where you type in the code, there is the
Window menu that lists the code modules. All the other code modules
have the name of the database pre-pended to the module. This one (the
main form) did also before I made a new field into Table 2 and moved
the control from the main form to the subform. Now the main form's
code module does not have anything in front of it while the other
modules still do.

Did I somehow disassociate the forms? The code can find the remaining
controls on the main form, it just can't find the two controls on the
subform. I didn't rename the form or anything.

Help?
 
Top