Here I am again with my next sql problem. I'm not sure if I can use insert into for what I need. What I want to do is the following.
My tables
I have tblreminder with userid workid workdate
I have tbluser with userid and username
My textbox
I have txtuser
Variables
idwork
mydate
I want to add new record to tblreminder
tblreminder.userid = select userid from tbluser where username = txtuser
Here is my code that's not working
adoreminder.RecordSource = "INSERT INTO tblreminder(user-id) SELECT tbluser.id FROM tbluser WHERE tbluser.Name = '" & txtname.Text & "'"
Can anybody help me?