I have a question. I am pretty new to sql. bit more experienced in VBA (excel). So I have created a userform with textboxes (with dates) and I need to transfer these to my database. So I am using an instert into statement. it works for all other values, execept when I want to add the date textbox into my string. I get an syntax error. Hope someone can help.
strQuery = "INSERT INTO[Database$] (date,allocation,hours,reason,team)" & _
vbCrLf & "VALUES (" & "#" & Chr$(39) & Firstdate & Chr$(39) & "#" & "," & 
Chr$(39) & Name_Abs & Chr$(39) & "," & Chr$(39) & Hours_t & Chr$(39) & "," & 
Chr$(39) & Reason & Chr$(39) & "," & Chr$(39) & Team & Chr$(39) & ");"
If someone can help me that would be great..