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

Form with a subform

Status
Not open for further replies.

Datathumper

Technical User
Jan 26, 2004
46
0
0
CA
Here is an easy one for you experts...(not so easy for us amatures)

I have a form, with a subform which is linked by fields named isonumber (same name in both tables). Everytime I add a new record, I get a 2 records added in the sub form table...one with the isonumber and one blank. How can I avoid getting this blank record added every time?

In the relationships window, I have them related with cascade update feature. I have tried without this and have the same problem.

THanks in advance...
 
Datathumper,

Make isonumber either a primary key in both tables or set the index for no duplicates then make sure you have a 1 for 1 relationship. That should solve it for you.

Chuck
 
Thanks

I tried this, but I am still getting blank records in the table being generated every time that I add a new record. I even set the "allow zero length" to no. It is an annoying little problem that I have not had happen before.

 
Hi datathumper,

I assume there is something wrong with your record source of the subform:
The one record that appears on your subform is obviously that of the main table!
The other is then "created" in the related table.
Have you set a 1:n relationship with referential integrity and DELETE/UPDATE forwarding?

Perhaps the second sub-record is no record at all, just the placeholder for a new record?

Cheers,
Andy

[blue]The last voice we will hear before the world explodes will be that of an expert saying:
"This is technically impossible!" - Sir Peter Ustinov[/blue]
andreas.galambos@bowneglobal.de
HP:
 
I found the problem...thanks for all of your help

It was due to one of the ON CURRENT events that I had in the code. I turfed the event and all is good.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top