add records to INNER JOIN query

C

Co

HI ALL,

I use following query:

"SELECT Abonnementen.folder_naam, Abonnementen.gebruiker,
Abonnementen.folder" & _
"FROM Abonnementen INNER JOIN Kabinet ON
Abonnementen.folder_naam = Kabinet.foldername" & _
"WHERE gebruiker='" & sUserName & "'"

Now I want to add a new record to the table Abonnementen.

Abonnementen.Gebruiker = sUserName
Abonnementen.folder_naam = ListBox2.Items.Item(i)
but the field Abonnementen.folder = ?

Abonnementen.Gebruiker = textfield with UserName
Abonnementen.folder_naam = textfield with name of folder
Abonnementen.folder = numeric field corresponding to a certain
foldername

This is a numeric field in Kabinet named folder_naam. How do I get
this value?
Or is this not possible?


Marco
 
J

Jerry Whittle

Create a form with the parent table. Then create on it a subform for the
child table. If joined properly, Access will populate the foriegn key field
in the child table with the primary key field data in the parent table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top