Hey all!
Im creating a site where users can sign up ect. I have a relational database where im using the fields USER_ID as Key fields. The tables Details and Users are linked by this....The key is an auto number btw.
When i use the sign up form i get an error stating that the data is required in the Details table. From what i can make out of it, the Key field from Users is not going over to the new record in the Details table.
I am using two sql statements to write the data to the Access Database.
Just a note, when the tables wernt linked it worked fine.
This is the first SQL statement
Here is the second one which dosnt work due to the primary key issue
I will state it again. I can write to both tables when they are not linked.
The first SQL statement is working fine and writing the values.
So pretty much, i need to get that primary key from the Users table into the Details table.
Thanks in advance
Im creating a site where users can sign up ect. I have a relational database where im using the fields USER_ID as Key fields. The tables Details and Users are linked by this....The key is an auto number btw.
When i use the sign up form i get an error stating that the data is required in the Details table. From what i can make out of it, the Key field from Users is not going over to the new record in the Details table.
I am using two sql statements to write the data to the Access Database.
Just a note, when the tables wernt linked it worked fine.
This is the first SQL statement
Code:
sSQLB = "INSERT into Users (Email, Pass) values ('" & _
Email & "', '" & Pass & "')"
Code:
sSQL = "INSERT into Details (NickName, FirstName, Surname, Email, Country, DOB) values ('" & _
NickName & "', '" & FirstName & "', '" & Surname & "', '" & Email & "', '" & Country & "', '" & DOB & "')"
The first SQL statement is working fine and writing the values.
So pretty much, i need to get that primary key from the Users table into the Details table.
Thanks in advance
Comment