I HOPE I can describe this correctly this is weird.
I set the key on id in table2
I created a new record and exit...
it pops up a box saying that index or primary key cannot contain a
null value.
so there is no blank record now.
I tried this 3 times, autoid in table1 239, 240, 241
nothing in table2 but each time the same warning
I went in and added data in one record, that wrote to table2
should have created a 239....with data
on exit ok
went into the table and in table2 there is now a 239,240, and 241
record even though I only edited the 239 record.
Where did 240 and 241 come from ???
man this gets weirder by the minute
Jerry
On Fri, 11 Aug 2006 17:06:54 +0200, "Arno R"
<ar***********@tiscali.nlwrote:
>Is your id field the Prime Key of table 2. I guess not.
The field is not required, otherwise there can be no blank records.
Make this field the PK so it will be required.
Check what happens after this modification.
Maybe Access will 'tell' you what is/was wrong.
Arno R
"sparks" <js******@swbell.netschreef in bericht news:s9********************************@4ax.com...
>ok it has an add record button. made from the toolbox it looks like.
as soon as you push the button it puts a blank record in the subform
table.
But if you push it again without adding anything to the record it
won't create another blank
so I hit add record..put in a number in the id field and closed
open hit add record..put in a number in the id field and closed
I did this 4 times and got 4 blank records in the subform table.
They are linked by the autoid in table1 to id in table 2. And set
that way in the subform.
the blank records do NOT have an id or anything in them they are
completly blank.
man this is weird.
I just made a new blank database and imported the tables and forms and
it does the same thing. I was hoping that something in the old one was
just screwed and might fix it....NOPE
On Fri, 11 Aug 2006 16:01:27 +0200, "Arno R"
<ar***********@tiscali.nlwrote:
>>>Do you really see a blank record in your table ??
Or do you only see a 'blank line' in the subform??
Do you see two blank records in table 2 after inputting two records in table 1??
Arno R
"sparks" <js******@swbell.netschreef in bericht news:5i********************************@4ax.com...
I am trying to fix a database that someone did about 4 yrs ago in
access97.
The main table just contains demographics and is on the main form of
the database.
It has a subform on a tab that contains the other information.
it is set 1 to 1 in the relationships.
simplify if I can
table 1 and table2
main form table 1
tab
subform table 2
when you create a new record and enter a id number on the main form
and exit.
you have the correct info in table 1 and table 2 has a blank record.
you again put in info in main form and enter data in in the subform.
you have a record in table 1, a record with the linked id in table
to...all looks ok but then I again have a blank record in table 2.
I tried to see if they had some type of requery in the forms or maybe
even some default value or something but it seems that when you add
a record and type in anything in the main form a blank record is
created in the subform table at that instant.. and when you enter
something in the subform a correct linked record is created.
but for the life of me I can't figure out why the blank record is
created in the subform table.
any ideas are greatly appreciated
Jerry