Ok well I tried that. Not working right. Let me make sure im doing this
right. I will list everything im doing below step by step
1. I have my main table set up for my members with the members ID field. It
isnt autonumber, but a integer of 4 characters max. I do not provide a id,
When someone signs up from my services ONLINE OR I ENTER THEM MANUALLY, a 4
digit members ID is generated. The rest of the fields are for their personal
info, etc..
An Integer doesn't have "characters" - it's a 32 bit binary number. Do
you mean that you have the format set to only display four digits? If
so that's a display-only property.
I created a 2nd table for Accounts. I made a membersID field as well for
that one. Both have that as a primary key.
A Primary Key is - *by definition* - unique within the table. There
can be one and only one record with a given value of the primary key.
If you make the MembersID the primary key of both tables, you are
saying that each Member can have one, and only one, account. I don't
think you want that!
Instead, use an AccountID - autonumber if you like - as the primary
key of the Accounts table, and a *separate* MembersID field of the
same datatype as the Members MemberID field as the foreign key.
Should i have a different key name
rather than membersID as well?
The name of the field plays no part whatsoever in the relationship.
It's customary and convenient to use the same name for a "foreign key"
as the name of the primary key (i.e. call it MembersID) but it is not
essential to do so.
I then created a form with the Members table.
Below it, I inserted a subform, and when it asked me what Table/Query/Form I
wanted to use, I selected the accounst form with all the fields including
membersID.
Well... the subform is *on* - inside - the mainform, not "below" it.
I'm not certain what you're saying here.
Am I doing this right? When I was done, I saw the form below, and tested it.
I entered accounts in, but when I hit the arrow to view next client, and came
back , the accounts were gone and it also showed all the accounts i just
typed in for the client on the next clients as well. So i Dont know what I am
doing wrong. Can you tell me exactly what needs to be done after inserting
the subform, etc..
You may want to repost in a new thread, specifying that you're using
an ASP page. I've done all my work in Access MDB forms and I cannot
remember how (or even if you can!!) set up a Form/Subform on an ASP
page.
But, in an Access form, the linking takes place automatically. I
suspect that it's different on ASP. Sorry if I led you down the wrong
path, if that's the case!
John W. Vinson[MVP]