Recent content by Lisad

  1. L

    Complicated Select Query

    Yes, but this does not make any difference.
  2. L

    Complicated Select Query

    I have 3 tables that i wish to pull information from:- TBLProspects LeadID (Primary Key) CompanyName RenewalDate Status TBLNotes NoteDate Note Who LeadID TBLQuotes QuotePremium Income Reason OnCoverPremium LeadID I have created the query and at the moment, I am getting duplicated rows of...
  3. L

    Sort Continuous form based on condition

    I have a continuous form with a description field. I have set conditional formatting to turn the background of the description field Red if the Diary field = Date(). This works great. BUT.... Is there a way to then display the highlighted records at the top of the continuous form or to...
  4. L

    Excel - Sharing Violation

    When trying to save an excel worksheet on a network share, I get a sharing violation error where i can save the changes into another file or lose the changes. I have permission to write to this file and other users on the network are unaffected. If I log on to another computer, I do not...
  5. L

    Return dates based on day and month only

    I would like a query to return dates based upon the input of just the day and month. At the moment I have a parameter query which asks for 'start date' and 'end date' and this works fine, but I want the query to return all the records for all the years in the database and not just the current...
  6. L

    Addnew only adds one record!!

    This worked great - Thanks Scott!
  7. L

    Addnew only adds one record!!

    I've made some progress, but... I have changed things a bit. This is the code I currently have. I have RPTGeneralLetter being ran based on a combo box to select the query it uses. I also changed to DoCmd.RunSQL and this works. Private Sub Report_Open(Cancel As Integer) Me.RecordSource =...
  8. L

    Query with Inner Join

    I am trying to create a query which shows only the newest note for every prospect. I have the code below, but I get a 'Syntax error in JOIN Operation' when I try to run the query and TBLNotes is highlighted. SELECT TBLProspect.CompanyName,TBLNotes.Note, TBLNotes.NoteDate FROM TBLNotes AS a...
  9. L

    Query creating duplicates

    Enter Parameter Value I have made the changes you suggested and I now get prompted for the Parameter value QRYNotes.ProspectID. I want to show the first note for all the records Any ideas?
  10. L

    Query creating duplicates

    I have the following two querys which are supposed to return only the latest Note for a Prospect. QRYNotes SELECT TBLNotes.ProspectID AS Expr1, Max(TBLNotes.NoteDate) AS MaxOfNoteDate FROM TBLNotes GROUP BY TBLNotes.ProspectID; QRYNotes2 SELECT DISTINCT TBLProspects.CompanyName...
  11. L

    Show me the last 4 invoices for every customer

    What about 2 tables? What would the SQL be for 2 tables? I'm selecting CompanyName from TBLProspects and Note and NoteDate from TBLNotes. I want to show only the latest Note for each company.
  12. L

    Addnew only adds one record!!

    All looks fine Scott, I did the append query and it looked exactly the same as what you suggested apart from it had QRYLetterByPoscode.LeadID instead of just LeadID. I changed it and it still came up with the 'Too Few Parameters' rubbish. I've attached a copy of my DB. Thanks for having a...
  13. L

    Addnew only adds one record!!

    This is exactly what I have... Option Compare Database Private Sub ReportFooter_Print(Cancel As Integer, PrintCount As Integer) strSQL = "INSERT INTO TBLLetterHistory (LeadID, LtrDate, ReportName) " strSQL = strSQL & "SELECT LeadID, Now() AS LtrDate, 'RPTLetterByPostcode' AS ReportName FROM...
  14. L

    Addnew only adds one record!!

    Too few parameters I have put the SQL into the Report Footer's On Print. When I run the report and scroll through the letters I get an error that says 'Too Few Parameters. Expected 1.' and the Debug highlights CurrentDb.Execute strSQL. Any ideas?
  15. L

    Addnew only adds one record!!

    I have the following code which is supposed to insert a new record into TBLLetterHistory when a report is printed. The report is based on a Query which selects the records based on their postcode. What actually happens is that only the first record in the query is inserted into the History...
Back
Top Bottom