You nailed it dilettante. I tried your brackets suggestion and it worked. I've also set up the short cut as suggested.
Thanks so much for everybody's time.
I created an Append Query in Access and successfully appended the owners name from the related table into the Renewal table without error. I then took the SQL from access modified and dropped it into the VB project. The result was the same, Syntax Error. The SQL is below:
strSQLRenewal =...
I'm using an Access 2003 database. Yes I do have a table named Renewal and the first field, the key field, is Comp. No other fields in the table are required. The field is defined as a text field.
I cant help thinking I'm missing something really simple (read "stupid").
Thanks again.
Thanks for the responses. gmmastros, I tried your suggestion without success. Below is what appeared in the Immediate Window both for what strSQLRenewal contained and the resulting error.
?strSQLRenewal
INSERT INTO Renewal(Comp) Values ('Johnson Group')
?Err.Description
Syntax error in...
Can anyone see what's wrong with this code? It's a simple INSERT INTO statement yet I continue to get a "Syntax error in INSERT INTO statement". The Renewal table is the "many" of a one to many relationship but a similar record exists in the "one" table. If I open up the Renewal table I can...
As an absolute beginner with reports in VB6 I have a Data Environment pulling from an Access2007 database. I also have a date report that prints fine but I'm trying to place a caption into a label based upon the value of a text field in the detail section. My problem is I don't know when to do...
Using the following Update statement I get a "Compile Error: Expected: (" with the last appersand in the last line highlighted (the one directly after "strComp". I thought I've tried every variation with no luck. The string value strComp may contain hyphens. Can anybody see what I did wrong...
Thanks for the reply Andy. I used an If/Else statement with "If Month(Now) > 6 Then" because from July and on 6 months puts me in the next year. I then used a variable for the month because again, July and on plus 6 gives me 13, 14....
In the If/Else I use Year(Now) and Year(Now)+1 depending if...
I'm trying to pull all records that include an anniversary date 6 months from the current month. For example it is now July so I want to list all records with an anniversary any day in the month in December of 2013. I tried the following code but does not consider the year. It returns records...
I'm trying to set the recordset for a form to show all leases that renewed the previous month. For example it is now January if I open the form I want the recordset to show all leases that renewed in December, next month, February, I want the forms recordset to list all leases that renewed in...
So, next time you'll post all the relevant code..."
I'm not sure what this means. I posted all my code. I checked out the record count in the immediate window after opening the record set with the suggestion PHV gave me. I was searching other sites when I saw someone had used the MoveLast. I...
You were correct PHV. Your suggestion worked. I had not idea I had to do a rs.MoveLast before the rs.RecordCount would give me a true record count in the record set.
Sorry for being slow and thanks again to all for the help.
Eddy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.