PDA

View Full Version : [SOLVED] Adding a line to an acces table from a vba userform



WILDDUSTIE
04-09-2017, 06:17 PM
I am relatively new to programming and have an issue I can't seem to overcome. I need to insert a record into an access table based on entries from a userform. I'm getting a syntax error on my sql query:

strSQL = "INSERT INTO appointment SET APPTID = '" & SETAPPTUF.apptid & _
"', SET DOCTORID = '" & SETAPPTUF.drid & _
"', SET PATIENTID ='" & SETAPPTUF.ptid & "'" & _
"', SET APPTTIME ='" & SETAPPTUF.apptdate & "'"

Any help is appreciated.

WILDDUSTIE
04-10-2017, 03:46 AM
Thanks to anyone who looked at my problem, but I have it figured out now.