Search results

  1. P

    Timing code

    This is probaly known to the gurus on this forum but it came as news to me when I was searching to a solution for another problem. There is a timer available in Access which you can use, for example, to time the speed of your code, which can be as accurate a 1ms. It can be declared where you...
  2. P

    Repeated use of a report

    OK last post as I have been able to complete this part of the project. Where as MsgBox is modal and does not allow any other window to take focus there is another message box available in user32.dll which isn't. By adding: Public Declare Function MessageBox Lib "user32" Alias "MessageBoxA" _...
  3. P

    Repeated use of a report

    Thanks for your reply. I have contstructed it by customer so yes, each customer report set is seperately requested/printed, it is the next level, the printing reports by product I need to interupt. I have tried using a message box but that takes focus and does not allow opening menus or the...
  4. P

    Repeated use of a report

    This is related to an earlier post I made, but I have now moved on to the printing stage. To recap I have Price lists for 10 products for 6 customers whch are usually printed in sets, a couple of times a year, The reports are all the same differing only by the customer, their discount and the...
  5. P

    Combining queries using SQL

    Thanks I will experiment with that
  6. P

    Combining queries using SQL

    I wanted to use SQL as I am opening 10 similar reports based on similar queries. Just some small text changes in SQL will do this. I am trying to speed up some old code that uses macros listing the reports, the reports being based on a query that iself is based on a query. It is the very first...
  7. P

    Combining queries using SQL

    I should have said I want to use the resulting query (3) as the where condition in an OpenReport statement for a dynamic report I am creating.
  8. P

    Combining queries using SQL

    If a query is based on two other queries, how is that actioned in vba using SQL? SQLqry1 = "SELECT....." SQLqry2 = "SELECT...." SQLQty3 = ?? (Selecting all the of results of SQLqry1 and SQLqry2) DoCmd.OpenQuery SQLQry3 Thanks
  9. P

    DLast not showing correct values

    Changed it to a recordset and it is correct, and much much faster Thanks
  10. P

    DLast not showing correct values

    What is the point of DFirst and DLast if it does not work on a sorted query !! Will DMin and DMax be any more reliable? I have been considering changing to recordsets as I think it will be faster, it is just that I wrote this a while ago and don't revisit it unless there is a problem.
  11. P

    DLast not showing correct values

    I know that Dlast DFirst etc do not always return the first and last record if you use them on a table, but they are supposed to work on a query that has been sorted. However I have one that doesn't! There are 3685 records all shown in the correct order when I view the query but the DLast...
  12. P

    SQL Syntax

    However putting the single quotes back does! Thanks everyone
  13. P

    SQL Syntax

    Dyslexia rule, KO !! Correcting that and using no quotes gives an error on the line: SELECT Parts.* INTO [Parts Old] IN Z:\Database\2000\Service2k.mdb FROM Parts; of
  14. P

    SQL Syntax

    Tried it, same error !
  15. P

    SQL Syntax

    Thanks for sticking with this! The error is : A debug.print of the SQL before the SQL is actioned is: SELECT Parts.* INTO [Parts Old] IN 'Z:\Database\2000\Service2k.mbd' FROM Parts; Which makes me think the single quotes are not allowing the path to be read as a text string. There is just...
  16. P

    SQL Syntax

    I haven't but it is the same as alternating quotes. " & Chr(34) & Text & Chr(34) & " the same as " ' Text ' " Which I have tried
  17. P

    SQL Syntax

    Thanks. I had tried the " & " path " & " solution but it does not leave the path in quotes which I assume it has to have.
  18. P

    SQL Syntax

    Can someone please advise the way to include the quotes for a path in a SELECT INTO IN FROM statement. The following does not seem to like the path section? StrSQL = "SELECT Parts.* INTO [Parts Old] IN 'Z:\Database\2000\Service2k.mbd' FROM Parts;" Cheers
  19. P

    How to update path to linked tables?

    How about this a way to proceed? At the time of installation open a form and ask the user where the backend is has been installed. Use that path to Re-link the BE db tables, maybe using DoCmd.DoMenuItem lines. pnb
  20. P

    Creating a new record

    This seems to work ok. but there maybe some surplus lines Perhaps the experts can advise? Dim db As Database Dim rec As Recordset Dim RecArray(20) Dim i As Integer Set db = CurrentDb() Set rec = db.OpenRecordset("SetupData") rec.FindFirst "param_current = -1" For i = 1 To rec.Fields.Count - 1...
Back
Top Bottom