Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. EddyLLC

    Error in simple Insert Into Statement

    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.
  2. EddyLLC

    Error in simple Insert Into Statement

    Hi Bluejay07, I just noticed your question. If you mean a field size setting for Comp it is 75.
  3. EddyLLC

    Error in simple Insert Into Statement

    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 =...
  4. EddyLLC

    Error in simple Insert Into Statement

    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.
  5. EddyLLC

    Error in simple Insert Into Statement

    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...
  6. EddyLLC

    Error in simple Insert Into Statement

    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...
  7. EddyLLC

    Trouble using value of field in VB6 report to set label caption

    I've found a solution if not the answer to my issue. I referenced the DataEnvironment instead of the DataReport to find the value.
  8. EddyLLC

    Trouble using value of field in VB6 report to set label caption

    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...
  9. EddyLLC

    Compile Error: Expected: ( in Update statment

    I just discovered strComp is the name of a function so I changed the variable name and it works fine so... never mind.
  10. EddyLLC

    Compile Error: Expected: ( in Update statment

    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...
  11. EddyLLC

    DatePart problems considering month and year

    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...
  12. EddyLLC

    DatePart problems considering month and year

    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...
  13. EddyLLC

    I'm trying to set the recordset for

    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...
  14. EddyLLC

    DatePart in sql not working

    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...
  15. EddyLLC

    DatePart in sql not working

    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
  16. EddyLLC

    DatePart in sql not working

    Darrylles- I made your suggested changes, replacing the quotes with singles around the m in DatePart('m', Date()+5) I received another compile error: Expected Expression with the single quote preceding the m highlighted. Andrzejek - Yes the RenewalDte is declared as a Date in the db with a...
  17. EddyLLC

    DatePart in sql not working

    I receive a Compile error: Expected: end of statement error and the last ")" is highlighted. If I remove it I get the same error but now the last quotation mark is highlighted.
  18. EddyLLC

    DatePart in sql not working

    Thanks for the reply. Sorry about that. I've been at it too long. Here is the actual code up till I try to open the record set. I haven't finished it because I can't get that far. Dim strSql As String Dim dbsDB As DAO.Database Dim rs As DAO.Recordset Dim strOwner As String strOwner =...
  19. EddyLLC

    DatePart in sql not working

    I want to return all records that have the RenewalDte falling in the 6th month from the month the sql is run. I've figured it as a query in Access 2007 but can't seem to get it to work as an sql statement. Hopelessly lost, any help is appreciated. The statement the won't work is below. strSql...
  20. EddyLLC

    Recordset closes after ending sub, can it stay open?

    Found the answer. No need for to bother. Thanks.

Part and Inventory Search

Back
Top