Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error while referencing the object

Status
Not open for further replies.

YO123

MIS
Jul 26, 2001
77
BE
Hi,

I created a normal form with subform, (Article, Composition)
which are linked tables
Table Article:
ArticleID (Key)
Description

Table Composition
ID (Key)
ArticleID (Key)
Composite
Amount

Links: One to many Article.ArticleID on Composition.ArticleID

The point is that one article can have more composite articles.

Ex: Art 1 has Comp Art 2, Art 3
Art 2 & 3 exist

In the table this looks like:

Article
ArticleID Descr
1 ART 1

Composition
ID ArticleID Comp Amount
1 1 2 100
2 1 3 50

When I now create a form around these table and I go into the subform of the components, the following error comes up:

An error occurred while referencing the object.
You tried to run a Visual Basic procedure that improperly references a property or method of an object.

when I click ok, I can continue and the entries are stored in the tables.

I do not use any VB procedures in these forms.

Does anyone have an idea to what this might be.

Tnx,

YO
 
Maybe you could post the code-behind-the-form so we could see what your VBA error might be caused by. Did you create the form/subform using the wizard? If it kicks you into the code maybe you could identify where the error occurred.



-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
There is no code behind the form.
I created the form & subform with the wizard.

I think the problem is in the following:
I created a combo referring again to all articles. the thing is that in the article, the component is again an article (off course). When you leave the combo out and jst take the table as subform (without combo) and you just enter the numbers for the components, it works OK. But the catch is that people could only choose from the articles that are available. Otherwise they enter anything they want in the component field and the rest of the calculations will fail.

So I think it has something to do with this, but I can't figure out what exactly.

Tnx,

YO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top