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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform - on enter new record - Error

Status
Not open for further replies.

KUZZ

Technical User
Aug 13, 2002
254
GB
Hi,

I have a master form with datasheet subform. Main form fields (pri key) ptnr;rev. Subform fields are ptnr;rev;parent_nr;parent_rev. Main is linked to subform like this : linkchild =>parent_nr;parent_rev linkmaster: ptnr;rev. When trying to enter new record in the subform I get the following error: "An error occured while referencing the object. You tried to run a Visual Basic procedure that improperly references a property or method of an object." I click okay and am able to continue to enter data in the subform. What I noticed is that the parent_nr and parent_rev field on subform do not get populated with ptnr;rev values from the main form. Any ideas on how to eliminate this error? I am running MS Office Professional 2003, SP2

Good luck,
Kuzz

"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
 
Have you tried to play with a continuous subform instead of a datasheet ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya KUZZ . . .

I have no Idea what . . .
KUZZ said:
[blue] (pri key) ptnr;rev
and
ptnr;rev;parent_nr;parent_rev[/blue]
. . . infers?

I'm guessing your talking a [blue]compound primary key here![/blue]

[blue]Be more specific about this . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
That is a compound primary key indeed. In my part numbers master table "part number" and "revision" are unique combinations.

Good luck,
Kuzz

"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
 
Tried continuous forms, same issue. When I try to enter new data an error box will pop up as described above, but after clicking okay it will allow me to enter.

Also, check this out; I experimented with a subform in a subform in a form (3 layers total) and I do not get this error while from within the first subform I am enterind data in the second subform. (layer 2 to 3) but in layer 1 to 2 I get the error.

Good luck,
Kuzz

"Time spent debating the impossible subtracts from the time during which you
can try to accomplish it."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top