Re: A little VBA help please

2014-06-29 Thread Bruce Sorge
Yeah still the same issue. Screw it. I'll take a 0 on this assignment. I don't care. Still going to get an A in the class. On Sun, Jun 29, 2014 at 1:18 PM, Maureen wrote: > > Would probably help if I had the syntax right: > > Dim SQL As String > > SQL = "INSERT INTO Borrowed (CustID, CDDV

Re: A little VBA help please

2014-06-29 Thread Maureen
Would probably help if I had the syntax right: 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 Sun, Jun 29, 2014 at 10:37 AM, Bruce Sorge wro

Re: A little VBA help please

2014-06-29 Thread Bruce Sorge
Oh no. I could go on and on, but that would have to start a whole new thread. Sent from my iPhone 5S > On Jun 29, 2014, at 11:19 AM, Zaphod Beeblebrox > wrote: > > > surely that can’t be the only reason ;) > > >> On Jun 29, 2014, at 9:37 AM, Bruce Sorge wrote: >> >> This is why can't s

Re: A little VBA help please

2014-06-29 Thread Zaphod Beeblebrox
surely that can’t be the only reason ;) On Jun 29, 2014, at 9:37 AM, Bruce Sorge wrote: > This is why can't stand access ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272

Re: A little VBA help please

2014-06-29 Thread Bruce Sorge
I'll give that a try Judith. Sent from my iPhone 5S > On Jun 28, 2014, at 10:42 PM, Maureen wrote: > > > 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.C

Re: A little VBA help please

2014-06-29 Thread Bruce Sorge
Actually without the #, everything works fine. The only issue is that the date picker inserts the time instead of the date. Access needs the #'s to enter dates from what I understand. This is why can't stand access. Sent from my iPhone 5S > On Jun 28, 2014, at 10:34 PM, "C. Hatton Humphrey"

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