Search results

  1. J

    Query with dates order

    Please see new format above
  2. J

    Query with dates order

    If you look at Query1, It shows all data and Dups on each date. What I want to show is (sorry about the spacing etc): Query1 CustomerName DateIn DateOut Jim 01/01/2000 14/01/2000 Jim 01/06/2000 14/06/2000 Jim 01/01/2001 14/01/2001 and...
  3. J

    Query with dates order

    Example - database attached
  4. J

    Query with dates order

    If I create a query linking the ID field on Person Table to the ID on the other two tables with dates, it'll duplicate the lines as the query won't know how to say. The earliest date on table 1 - then find the date on table two which is greater than the first date but less than the next date...
  5. J

    Query with dates order

    I have 3 tables. A person table, a checking in table and a checking out table I want to build a query that brings back one line for a person thats checked in and out for each stay E.g "Person a" - "01.01/2000" - "02/01/2001" "Person a" - "01.02/2000" - "02/02/2001" "Person...
  6. J

    Count and sum data in report

    I don't think I can use the Dcount as there maybe more fruits than the ones I know, unless I am misunderstanding the DCount function.
  7. J

    Count and sum data in report

    Hopefully an easy one. For example, I have some data and in this data contains a column with fruit. Four rows have apples Two rows have pears Five rows have oranges In the header I want to say there where 3 fruits, but if I use count it says 11 (which is of course right - but not what I want...
  8. J

    VBA Export to another DB string

    I tried to import the tables into the current DB and -then copy the data over to the destination DB -and then delete the table from the current DB. Although slow it did work. But, and a big BUT, was that although the tables were deleted the size of the current DB just grew out of control. I...
  9. J

    VBA Export to another DB string

    Yes they are linked tables - but as mentioned earlier - I dont have access to sql server management studio to run it from there
  10. J

    VBA Export to another DB string

    I see what your thinking - But the way it's set up is that at midnight I have a form on a timer that copies a blank db then copies all the data into it and then renames it to todays date. Therefore, that DB never gets opened and it's all automated
  11. J

    VBA Export to another DB string

    Not sure how to do that and also I worried about locking users out of the database due to the heavy traffic in using this method. Hence I was trying to access the sql Server directly without slowing down traffic But I am great full for your assistance
  12. J

    VBA Export to another DB string

    How would I do this in VBA to loop through the tables without creating over 200 queries
  13. J

    VBA Export to another DB string

    Wont this just create another linked ODBC linked table - Im trying to create a backup of the data in sql server. (Also, I dont have sql server management studio to do this server side) Unless you know another way apart from what Im currently doing: CurrentDb.Execute " SELECT [" & tdf.Name &...
  14. J

    VBA Export to another DB string

    Correct - but looping and copying through all the tables in the sql server. I have created a table with all the table names in so it knows which ones to copy Thanks for your help Also - I currently use this code that works - but it fails sometimes and locks users out of the database...
  15. J

    VBA Export to another DB string

    Yes I do - but some tables are huge - so I would rather not import into the current and then copy it to the destination DB. Trying to insert directly into the destination DB
  16. J

    VBA Export to another DB string

    This should be an easy one. I have the following code that works perfectly: Dim r As Recordset Set r = CurrentDb.OpenRecordset("tblTableNames") r.MoveFirst Do Until r.EOF If Left(r!tablename, 4) <= "sqlA" Then DoCmd.TransferDatabase acImport, "ODBC Database"...
  17. J

    Delete data from Tables in a different access DB

    I intend to exclude those by re coding : If t.Name Like "*" Then to If t.Name <> "Msys*" Then Thanks
  18. J

    Delete data from Tables in a different access DB

    Cracked it: On Error GoTo err Dim t As TableDef Dim vs As String DoCmd.SetWarnings False For Each t In CurrentDb.TableDefs If t.Name Like "*" Then vs = t.Name CurrentDb.Execute "Delete From " & vs & " In 'C:\Users\InternetUser\Desktop\TestSD.accdb'", dbFailOnError + dbSeeChanges End...
  19. J

    Delete data from Tables in a different access DB

    MI - Management Information I have control of the data through access - but I dont have sql Server Management studio to manipulate the data at the server end.
  20. J

    Delete data from Tables in a different access DB

    Sorry - was trying to keep it simple. Right: One live sql server with a front end access client One training sql server with a front end access client I do not have access to the sql server. My Static data tables may change over time. Therefore, once a month I want to update all the Static...
Back
Top Bottom