Recent content by Sally*

  1. S

    Copy records to 2nd table

    Just for the purpose of testing, I have removed the Primary Key from both tables but it still doesn't work. The master/child link on the invparts subform is the invoice number, but I don't have this field on the quoteparts table. I had assumed that it would autofill, as it does when I...
  2. S

    Copy records to 2nd table

    Hi, not quite sure what you mean by the NUMBER. Do you mean ID (autonumber). These two tables have no direct relationship
  3. S

    Copy records to 2nd table

    The primary key for both tables is an autonumber (ID), so it should never be null. If it helps, here are the fields for both tables: quoteparts:- ID (autonumber), quote (number), partno (text), partdescription (text), buy (currency), sell (currency), qty (number). invparts:- ID (autonumber)...
  4. S

    Copy records to 2nd table

    Thanks Ted, I think I'm getting there. When I look at the append query in SQL it looks like: INSERT INTO invparts ( partdescription, sell, qty ) SELECT quoteparts.partdescription, quoteparts.sell, quoteparts.qty FROM quoteparts WHERE (((quoteparts.quote)=[Forms]![INVOICE]!
  5. S

    Copy records to 2nd table

    Hi all, I'm getting myself into a bit of a muddle. I have four tables: tblinvoice / tblinvparts tblquotes / tblquoteparts when I open the tblinvoice form it has tblinvparts as a subform. tblinvoice has a listbox that lists quote numbers linked to vehiclereg. I have a button on the...
  6. S

    Copy search result into textbox

    Hi all. I have a quote form that has a button which opens a simple search form with just one textbox which gives the results in a subform. (the search is for the company name and the subform results give the company name with the full address (company, add1, add2, town, county, postcode) I...
  7. S

    run update query in autoexec

    Would this not list ALL invoices that are older than 18 months, including customers that are still ordering. I need to find all those customers who's last invoice was 18 months or older.
  8. S

    run update query in autoexec

    Is there another way of getting around the MAX? I need to update all customers who have not ordered anything in the past 18 months.
  9. S

    run update query in autoexec

    Hi, thanks for the advise. The original query only has two items, Archive and the MAX one. I have unticked the MAX option so it is no longer displayed, just leaving archive field. I then open a new update query using the above query and select just the Archive item which I try to update to...
  10. S

    run update query in autoexec

    Hi, I have an existing query that uses two tables INVOICES AND CUSTOMERS ('acno' in CUSTOMERS and 'account' in INVOICES as the link) to give me a list of customers who have not ordered in the last 18 months I use: Expr1: Max([INVOICES]![INVOICE DATE])<=DateAdd("m",-18,Date()) with -1 as the...
  11. S

    Openreport with date filter

    Perfect!! Many thanks
  12. S

    Openreport with date filter

    Thanks for the help but this is giving me a compile error: syntax error. There is an rogue bracket at the end of "\#mm/dd/yyyy\#". I'm getting an error if I either remove it or put the ( in front, like this: ("\#mm/dd/yyyy\#") so I don't know where the ( should be.
  13. S

    Openreport with date filter

    Hi all, stDocName = "daily sales report" DoCmd.OpenReport stDocName, acPreview, , "[invoice date]=#" & Me.[INVOICE DATE] & "#", acWindowNormal Thanks to your help I solved this problem...or so I thought!! This code has been working fine all month but it is now not working with the new month -...
  14. S

    Openreport with date filter

    Thanks very much, that sorted it. All this hassle for one mis-placed comma, doh!!
  15. S

    Openreport with date filter

    Hi, thanks for the link. I finally had chance to try this out and I am still getting the whole doc open. stDocName = "daily sales report" DoCmd.OpenReport stDocName, acPreview, "[reportdate]=#" & Me.[INVOICE DATE] & "#", , acWindowNormal
Top Bottom