Re: A little VBA help please

2014-06-28 Thread Maureen
Try setting the SQL statement to a variable, then execute the DoCmd.RunSQL. Dim SQL As String SQL = INSERT INTO Borrowed (CustID, CDDVDID, DateOut, DueDate) VALUES(" & Me.Combo0 & "," & Me.Combo2 & ", #" & Me.Text6 & "# ", #" & Me.Text8 & "#);" DoCmd.RunSQL SQL On Sat, Jun 28, 20

Re: A little VBA help please

2014-06-28 Thread C. Hatton Humphrey
On Sat, Jun 28, 2014 at 2:26 PM, Bruce Sorge wrote: > DoCmd.RunSQL Took a look at http://bytes.com/topic/access/answers/199515-docmd-runsql-not-reading-variable-combo-box Apparently the DoCmd.RunSQL doesn't know the Me object (or so the thread says). Best help I can give on a short search.

A little VBA help please

2014-06-28 Thread Bruce Sorge
Hey there community, I have a class project that is pissing me off. I have this bit of VBA code: DoCmd.RunSQL "INSERT INTO Borrowed (CustID, CDDVDID, DateOut, DueDate) VALUES(" & Me.Combo0 & "," & Me.Combo2 & ", #" & Me.Text6 & "# ", #" & Me.Text8 & "#);" It does not work. I get a syntax error