Subform Error - Object doesn't contain the automation object? Driving me nuts!

  • Thread starter Pamela via AccessMonster.com
  • Start date
P

Pamela via AccessMonster.com

Hello,

I am having a problem with a subform that's driving me crazy. I have a form
"Correspondence", which contains several subforms. One of these Subforms
"ProviderDetails" had a control on it "GrpPIN", which, whenever I would
ebnter a value anywhere on the form, the GRPPin control would automatically
populate with a zero. I didn't want it to do this & no matter what I did,
set GrpPIN to default to Null in the properties of the control and in the
table itself, so I got rid of the control entirely.

Now, when I open the form, it prompts for "GrpPIN" as though it were a
parameter query, only I had removed "GrpPIN" from everywhere in the project.
I don't find it in the VB code, it's not referred to in a query, & no other
controls on the form refer to it.

Any idea what this error means & why it's occurring when I open the form?
The Provider details form was once related to the Correspondence form, but I
had deleted the relationship between the 2. Currently, the form prompts for
"GrpPIN" when opened (for some reason). If I enter anything, the form &
subform open properly, but when I enter anything in the subform, the control
it was auto populating (for some reason) is now gone, so I get the error "The
object doesn't contain the Automation object 'GrpPIN' (because I deleted
GRpPin from the table & the form). If I don't enter anything when propmted
for GrpPIN, the subform doesn't show.

I'm baffled as to why it's prompting for GrpPIN when I can't find reference
to it anywhere in the project.

Thanks.
 
P

Pamela via AccessMonster.com

Under table properties, there is nothing in the Master/child link fields.
There wasn't before either... I am still learning Access , so I am not very
knowledgeable as to how these table properties should be set up?

Al said:
Have you verified that the Master/Child links are now correct?

HTH

Al
[quoted text clipped - 25 lines]
 
A

Al Williams

Pamela,

Since I don't know the purpose of your database and what you're trying
to achieve, I need to ask some questions:

1. What is the purpose of the subforms? Are you implementing
one-to-many or many-to-many relationships? I assumed you were which is
why I asked about the Master/Child link fields. Since those fields are
empty, it appears that you're using the subforms for another purpose.

2. What did GrpPIN do for you? It may have had a 0 value because that
value was required by the table's properties. e.g. Default Value may
have been set to 0.

It is hard to offer any more advice without knowing the answers to the
above.

Al

Under table properties, there is nothing in the Master/child link fields.
There wasn't before either... I am still learning Access , so I am not very
knowledgeable as to how these table properties should be set up?

Al said:
Have you verified that the Master/Child links are now correct?

HTH

Al


[quoted text clipped - 25 lines]
 
P

Pamela via AccessMonster.com

Initially, there was a relationship between the table the main form is based
on & the subform. The main form had a field called PIN (a Provider ID number)
which was the PK for the table. The subform, "Provider Details" is based on
a Provider detail table...it had PIN as a FK. This way, when the user
entered a PIN on the main form, the subform automatically filled in with the
Provider details. It worked fine until they (users) wanted the sub form to
be a data entry screen - they didn't want the form auto-filling because the
Provider details wouldn't necessarily always be the same. That is when I had
the problem - I couldn't get the info on the subform to stop auto-filling
even after deleting the relationship between the tables, so I figured I'd
simply delete the field in the table entirely & rename it something else.
Access insisted on referencing GrpPIN & would act as though there were A
parameter query based on it whenever I opened the form.

I've solved my problem with a work-around...I stuck the dang field back into
the Provider Details table & created another field named "GrpPIN2" & bound
the control on the form to it instead.

I would just like to understand WHY Access behaves like that. It doesn't
make sense to me. I am using Access 2002. It drives me nuts if I don't
understand why/how it's behaving...

Thanks!

Al said:
Pamela,

Since I don't know the purpose of your database and what you're trying
to achieve, I need to ask some questions:

1. What is the purpose of the subforms? Are you implementing
one-to-many or many-to-many relationships? I assumed you were which is
why I asked about the Master/Child link fields. Since those fields are
empty, it appears that you're using the subforms for another purpose.

2. What did GrpPIN do for you? It may have had a 0 value because that
value was required by the table's properties. e.g. Default Value may
have been set to 0.

It is hard to offer any more advice without knowing the answers to the
above.

Al
Under table properties, there is nothing in the Master/child link fields.
There wasn't before either... I am still learning Access , so I am not very
[quoted text clipped - 11 lines]
 
P

Pamela via AccessMonster.com

Made small corrections to my post...
Initially, there was a relationship between the table the main form is based
on & the subform. The main TABLE had a field called PIN (a Provider ID number)
which was the PK for the table. The subform, "Provider Details" is based on
a Provider detail table...it had GrpPIN as a FK. This way, when the user
entered a PIN on the main form, the subform automatically filled in with the
Provider details. It worked fine until they (users) wanted the sub form to
be a data entry screen - they didn't want the form auto-filling because the
Provider details wouldn't necessarily always be the same. That is when I had
the problem - I couldn't get the info on the subform to stop auto-filling
even after deleting the relationship between the tables, so I figured I'd
simply delete the field in the table entirely & rename it something else.
Access insisted on referencing GrpPIN & would act as though there were A
parameter query based on it whenever I opened the form.

I've solved my problem with a work-around...I stuck the dang field back into
the Provider Details table & created another field named "GrpPIN2" & bound
the control on the form to it instead.

I would just like to understand WHY Access behaves like that. It doesn't
make sense to me. I am using Access 2002. It drives me nuts if I don't
understand why/how it's behaving...

Thanks!
[quoted text clipped - 20 lines]
 
P

Pamela via AccessMonster.com

New problem....in the subform I am having difficulty with, when I enter new
info, it is entered into the table, but, when you move off of the record & go
back to it, the info is not displayed on the form. The other subforms on the
main form all work properly...I must not be understanding something about
Access & it's forms.




Made small corrections to my post...
Initially, there was a relationship between the table the main form is based
on & the subform. The main TABLE had a field called PIN (a Provider ID number)
[quoted text clipped - 25 lines]
 
P

Pamela via AccessMonster.com

Found it- the Subform had the reference in it's child/master links...that
part is figured out...now the subform still isn't showing the data that's in
the tables...I can ENTER the data, but when I scroll off a record & come back
to it, the data shown is the data of the first record...yeesh, this is
getting frustrating...
New problem....in the subform I am having difficulty with, when I enter new
info, it is entered into the table, but, when you move off of the record & go
back to it, the info is not displayed on the form. The other subforms on the
main form all work properly...I must not be understanding something about
Access & it's forms.
Made small corrections to my post...
[quoted text clipped - 3 lines]
 
A

Al Williams

Pamela,

The form/subform are related by the PK and FK you described. The PK and
FK are defined in their respective tables and I assume that you also
defined that relationship in the relationship window according to your
desire. The Master/Child link fields tell Access how to relate the
subforms. Ordinarily, Access will fill in those fields based on your
previous definitions. I suggest that you go back and re-implement
GrpPIN and select GrpPIN in both the master and child fields (I think
that that is the current PK/FK).

I don't know what you mean about auto-fill but am assuming that you mean
that some of the fields display entries at the time the next record is
opened. That can be dealt with after straightening out the PK/FK link.

Al

New problem....in the subform I am having difficulty with, when I enter new
info, it is entered into the table, but, when you move off of the record & go
back to it, the info is not displayed on the form. The other subforms on the
main form all work properly...I must not be understanding something about
Access & it's forms.




Made small corrections to my post...

Initially, there was a relationship between the table the main form is based
on & the subform. The main TABLE had a field called PIN (a Provider ID number)

[quoted text clipped - 25 lines]
 
A

Al Williams

Pamela,

Wayne Morgan has provided several items to look at in the other thread
you started this morning. My advice is to first follow all of his
suggestions and let him know if you still have a problem.

Al

Found it- the Subform had the reference in it's child/master links...that
part is figured out...now the subform still isn't showing the data that's in
the tables...I can ENTER the data, but when I scroll off a record & come back
to it, the data shown is the data of the first record...yeesh, this is
getting frustrating...
New problem....in the subform I am having difficulty with, when I enter new
info, it is entered into the table, but, when you move off of the record & go
back to it, the info is not displayed on the form. The other subforms on the
main form all work properly...I must not be understanding something about
Access & it's forms.

Made small corrections to my post...

[quoted text clipped - 3 lines]
 
P

Pamela via AccessMonster.com

Thanks...the GrpPIN was coming from the Master-Child link property in the
subform, I have reimplemented the relationship, but the subform still doesn't
behave like the others. I'll try a few more things & let you know if/how I
fix it. If you have any ideas, please let me know...I'm obviously missing
something.

Thanks!

Al said:
Pamela,

The form/subform are related by the PK and FK you described. The PK and
FK are defined in their respective tables and I assume that you also
defined that relationship in the relationship window according to your
desire. The Master/Child link fields tell Access how to relate the
subforms. Ordinarily, Access will fill in those fields based on your
previous definitions. I suggest that you go back and re-implement
GrpPIN and select GrpPIN in both the master and child fields (I think
that that is the current PK/FK).

I don't know what you mean about auto-fill but am assuming that you mean
that some of the fields display entries at the time the next record is
opened. That can be dealt with after straightening out the PK/FK link.

Al
New problem....in the subform I am having difficulty with, when I enter new
info, it is entered into the table, but, when you move off of the record & go
[quoted text clipped - 10 lines]
 
A

Al Williams

Wayne provided several suggestions to look at. I have found that
breaking PK/FK relationships and then re-establishing them requires
looking at everything again in detail hence my recommendation to follow
Wayne's suggestions. It might be faster to start over with the subform.
That is, to rename the current subform to something else, remove it
from the form, and build a new subform. That doesn't give you the
experience of learning what "breaks" when breaking the PK/FK
relationship but it may that the time available is more important.

Al

Thanks...the GrpPIN was coming from the Master-Child link property in the
subform, I have reimplemented the relationship, but the subform still doesn't
behave like the others. I'll try a few more things & let you know if/how I
fix it. If you have any ideas, please let me know...I'm obviously missing
something.

Thanks!

Al said:
Pamela,

The form/subform are related by the PK and FK you described. The PK and
FK are defined in their respective tables and I assume that you also
defined that relationship in the relationship window according to your
desire. The Master/Child link fields tell Access how to relate the
subforms. Ordinarily, Access will fill in those fields based on your
previous definitions. I suggest that you go back and re-implement
GrpPIN and select GrpPIN in both the master and child fields (I think
that that is the current PK/FK).

I don't know what you mean about auto-fill but am assuming that you mean
that some of the fields display entries at the time the next record is
opened. That can be dealt with after straightening out the PK/FK link.

Al

New problem....in the subform I am having difficulty with, when I enter new
info, it is entered into the table, but, when you move off of the record & go

[quoted text clipped - 10 lines]
 
A

Al Williams

Another thought: Did you re-establish the PK/FK relationship in the
relationship window?


Al said:
Wayne provided several suggestions to look at. I have found that
breaking PK/FK relationships and then re-establishing them requires
looking at everything again in detail hence my recommendation to follow
Wayne's suggestions. It might be faster to start over with the subform.
That is, to rename the current subform to something else, remove it
from the form, and build a new subform. That doesn't give you the
experience of learning what "breaks" when breaking the PK/FK
relationship but it may that the time available is more important.

Al

Thanks...the GrpPIN was coming from the Master-Child link property in the
subform, I have reimplemented the relationship, but the subform still
doesn't
behave like the others. I'll try a few more things & let you know
if/how I
fix it. If you have any ideas, please let me know...I'm obviously
missing
something.

Thanks!

Al said:
Pamela,

The form/subform are related by the PK and FK you described. The PK
and FK are defined in their respective tables and I assume that you
also defined that relationship in the relationship window according
to your desire. The Master/Child link fields tell Access how to
relate the subforms. Ordinarily, Access will fill in those fields
based on your previous definitions. I suggest that you go back and
re-implement GrpPIN and select GrpPIN in both the master and child
fields (I think that that is the current PK/FK).

I don't know what you mean about auto-fill but am assuming that you
mean that some of the fields display entries at the time the next
record is opened. That can be dealt with after straightening out the
PK/FK link.

Al


New problem....in the subform I am having difficulty with, when I
enter new
info, it is entered into the table, but, when you move off of the
record & go


[quoted text clipped - 10 lines]

Thanks.
 
P

Pamela via AccessMonster.com

I'll try your suggestions. I may simply rename the form like you suggested.
I love deadlines...

I'll post back if I can fix it as is or not following your suggestions. I'd
like to know why.

Thanks!

Al said:
Another thought: Did you re-establish the PK/FK relationship in the
relationship window?
Wayne provided several suggestions to look at. I have found that
breaking PK/FK relationships and then re-establishing them requires
[quoted text clipped - 44 lines]
 
P

Pamela via AccessMonster.com

Hi again;

I had to make a different table (copy/paste structure only), name it
differently & pointed the form to it. It works fine now. :) Thanks for the
help.
I'll try your suggestions. I may simply rename the form like you suggested.
I love deadlines...

I'll post back if I can fix it as is or not following your suggestions. I'd
like to know why.

Thanks!
Another thought: Did you re-establish the PK/FK relationship in the
relationship window?
[quoted text clipped - 4 lines]
 
A

Al Williams

You're welcome.

Al
Hi again;

I had to make a different table (copy/paste structure only), name it
differently & pointed the form to it. It works fine now. :) Thanks for the
help.
I'll try your suggestions. I may simply rename the form like you suggested.
I love deadlines...

I'll post back if I can fix it as is or not following your suggestions. I'd
like to know why.

Thanks!

Another thought: Did you re-establish the PK/FK relationship in the
relationship window?

[quoted text clipped - 4 lines]
 
Top