Search results

  1. J

    Tidying up SQL

    I'm not sure if this is possible, but i stick Carraige returns / line breaks and spaces and all sorts in my SQL to make them more human readable... but when i save and re-open, it's all reformatted and squashed back together. I can't find a setting for this in 2007 - does anyone have any tricks...
  2. J

    Simple WHERE statement using Month

    Brilliant - Works a treat using the table-once method ! Thanks SOOOOOOOO much for the help - i'd buy you a pint if you were here !
  3. J

    Simple WHERE statement using Month

    Hey, thanks mailman! I've spent the last few hours googling around and it looks like i can't have more than one query per report (which u obviosuly knew). So, if i understand you correctly, i need to set up recordset in VBA... In your "this=that" example, can we have multiple citeria? For...
  4. J

    Simple WHERE statement using Month

    Hi mailman Formatting posts - understood....... Recordsets, not understood ;-( Sorry, i'm very much part time at this and havn't learnt very much about acess yet (but am learning loads thanks to forums like this !) I have an underlying query to a report. SELECT Sum([jb-2001].NET) AS...
  5. J

    Simple WHERE statement using Month

    Sorry - just had a quick play around (i should have done that first). If i use the following SQL everything works for me... SELECT Sum([jb-2001].NET) AS SumOfNET FROM [jb-2001] WHERE ((([jb-2001].WORKTYPE)="Chrome Mask") AND (([jb-2001].GONE)="yes") AND (([jb-2001].Sage)<>"0") AND...
  6. J

    Simple WHERE statement using Month

    Hi Mailman thanks for the explanation - i 'think' i can see what you mean. For the time being, the other solutions also works, although i know that it isn't the 'correct' way to do it. I'll see if i can figure out how to implement your solution also once i've got the guts of this thing...
  7. J

    Simple WHERE statement using Month

    Hey Mstef, Worked a treat ! But, as namliam pointed out, i hadn't thought about the year also ! So, curenttly i get year 08 and 09, which is what i don;t want. Is there a simple way of getting this current month (year AND month) in this method?
  8. J

    Simple WHERE statement using Month

    Hi All - hoping one of you guys can help.. I'm running a query, with a simple WHERE statement... WHERE ((([jb-2001].WORKTYPE)="Chrome Mask") AND (([jb-2001].GONE)="yes") AND (([jb-2001].Sage)<>"0") AND (([jb-2001].OUT_DATE)= Month(Now()))); I'm having problems with the Month part. I'm trying...
  9. J

    Naming a file according to the date

    Brill - works a treat - thanks very much !
  10. J

    Naming a file according to the date

    Hi guys, I'm a complete newby to VBA coding, and hoping someone here can help. I currently have a peice of code that exports a file called "john.csv". However, i'd like this filename to actually carry the date that it was created in the name itself, so something like this...
  11. J

    datasheet view - multiple rows per record

    Still stuck on this one - gonna have to pay to get a professional in to sort it for me unless i can come up with a workwround - would REALLY appreciate any advice.... thanks
  12. J

    datasheet view - multiple rows per record

    BTW - the only way i can think of doing this, is to run 9 seperate queries with 'if QTYn >0' criteria, export each one as a CSV, then merge them all together ! However, spotted something else - if i add the same table to the query (so the table is in the query twice), then i Kinda get multiple...
  13. J

    datasheet view - multiple rows per record

    Hi All - I don't even know how to start creating this query - any advice would be much appreciated ! I have a table, which has invoice data, and each record can have upto 9 seperate products/qty/prices on the record (e.g., [product1][qty1][product2][qty2] etc) I need to output this as a CSV...
  14. J

    Dlookup syntax for text criteria

    I tried changing the bound column, but it didn;t matter which column i picked, the query always returned column 1 of the linked table. Looks like i'm gonna open up a whole new can of works and try to add the price into the products table - never understood whyy it wasn;t in their anyway !
  15. J

    Dlookup syntax for text criteria

    PL456 - i've followed rich's advice and i've decided to go back to basisc. I'm trying to get the query working first before i do anything with the reports etc. Does the previous response from me make sense? BTW, i appreciate all the great help i'm receiving. I'm very much a newbie and i'm...
  16. J

    Dlookup syntax for text criteria

    Rich - OK, i've got rid of the lookups, and just added the table to the query and then added the criteria. Things look much simpler now. However, it's still acting the same way. here is my souce for the query.... SSELECT IIf([NET]=0,[PriceList]![Price],[NET]) AS Expr1, * FROM [jb-2001]...
  17. J

    Dlookup syntax for text criteria

    Hi Ken - PL456, Spent a whole day yesterday, and still can't fathom this out. I'd really appreciate any help you have, cause i'm beat ! I have a table (ProductList) with fields: ID, Code, Description I have a table called (PriceList) with fields: PriceID, Product, price In the table...
  18. J

    Dlookup syntax for text criteria

    Hi guys... ken - that didn't work, so i stuck it in the query as you suggested like this.... Expr1: IIf([NET]=0,DLookUp("[Price]","[Pricelist]","[Product] = '" & [CUST_REF] & "'"),[NET]) and i'm getting some very strange things happening. So, investigated a bit futher and found the culprit...
  19. J

    Dlookup syntax for text criteria

    Pulling my hair out with this - have spent over an hour retyping it, trying to get it to work. Can anyone tell me where i'm going wrong? I'm in a report called "Mask_order_book". There is a field on this report called "CUST_REF" (a text field). I want to look up this value in the "Product"...
  20. J

    Sum for an unbound field

    here i go again, answering my own posts! Sorry, will start to search more thoroughly before submitting posts from now on. Just found the answer on utteraccess.. basically, the IIf statement needs to go in the footer section as well, and not just a call to the control name. So, this works... =...
Back
Top Bottom