Search results

  1. S

    Export 2 queries to 1 csv (columns not the same)

    Depends if the team members need to be listed under manager or not. edit: Imean if you were outputting multiple teams manger1 teammember1 teammember2 manager2 etc you would need 2 recordsets.
  2. S

    Export 2 queries to 1 csv (columns not the same)

    I did a quick test CurrentDb.QueryDefs("query1").SQL = "select 'foo' & chr(34) & chr(44) & chr(34) & 'bar' from table1" DoCmd.TransferText acExportDelim, , "query1", "C:\Users\jon\Desktop\x.txt", 0 and got "foo"",""bar" for every record. I would think it would be quicker to open the file and...
  3. S

    Export 2 queries to 1 csv (columns not the same)

    Who are you responding to? If I have a field with a value of foo","bar and Access outputs it to file as "foo","bar" that's correct isn't it?
  4. S

    Question Filter data based on the User Login

    I'm not in the camp that thinks a shared front end won't work AT ALL, but my solution won't work that way, so I'm out. ;)
  5. S

    Question Filter data based on the User Login

    NP NG. I deleted my post when I saw everyone talking about fields/controls and reposted again. Your solution may still be relevant anyway.
  6. S

    BackEnd getting corrupted since (I think) Win 10 updates

    Maybe said already but worth saying again... Take regular backups until fixed. A compact repair probably isn't doing anything except deleting corrupt data/record keys. So you most likely will be losing data without knowing it.
  7. S

    countifs function alternative

    Where does a query go? The code I posted is SQL. SQL in Access is a query. So SQL would go in a query. When you goto create a new query it will ask for the table. Click Cancel. A button in the top left will change to show SQL. click that and enter the code I gave. It will probably not be as...
  8. S

    Export 2 queries to 1 csv (columns not the same)

    I think that's irrelevant? I inserted quote marks in the middle of the "text" in anticipation of that. You could concatenate every field into one sub field.
  9. S

    Access.Application connection to WorkGroup Secured Database

    You can write your own addin. Make all subs public functions in standard modules in one database. In VBA Editor change project name to 'myaddin' or whatever. Link that db as a reference in the one you are querying. Call your functions. Private Sub Command0_Click() myaddin.doSomethingCool...
  10. S

    countifs function alternative

    select distinct vehiclenumber, subsystem, 'level ' & (select sum(1) as failures from Query_MCUTracker group by vehiclenumber, subsystem) as failurelevel from Query_MCUTracker where MCUDate between date()-14 and date()
  11. S

    Export 2 queries to 1 csv (columns not the same)

    Concatenation? select 'hdr' as a, firstname, somenumber & chr(34) & chr(44) & chr(34) & somedate as b, jobtitle & chr(34) & chr(44) & chr(34) & location as c from table1 union select 'dtl' as a, firstname, somedate as b, manager as c from table2
  12. S

    Question Filter data based on the User Login

    Replace linked tables with queries. When you 'install' the application run code to update the SQL to select * from [\\server\share\blah\mydb.accdb].table1 where employeeID=12345 Job done.
  13. S

    Loop through records, but skips the first record

    You don't need to loop if you are only looking up one value. Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer) Me("dgicon").Visible = Nz(DLookup(True, "checklist_print_query", "dg ='Yes' and drivers_checklistID=" & checklistID), False) Me("t1icon").Visible =...
  14. S

    Loop a query until there are no records

    Dim db As dao.Database Set db = CurrentDb For i = 1 To 24 sSelSQL = "" sSelSQL = sSelSQL & "SELECT Import_Link.List, Import_Link.[Family ID], Import_Link.[Member ID], Import_Link.[Attendee Outcomes" & i & "] " sSelSQL = sSelSQL & "FROM Import_Link " sSelSQL =...
  15. S

    Query to Compare Data

    select a.*, b.CodeTestingStatus as newstatus, b.DataDate as newdate from tblAppInventory a inner join ( select CodeTestingStatus, DataDate, appid from tblAppInventory order by DataDate asc) b on a.AppID = b.AppID and b.DataDate > a.DataDate and a.CodeTestingStatus <>...
  16. S

    Can you use Access VBA to represent logical relationships in graphical form?

    Drop an IE control on a form and draw to that. https://www.w3schools.com/html/html5_canvas.asp edit : assuming the control supports it ¬_¬
  17. S

    Date Query

    select a.duedate, (select top 1 paymentdate from tblpaymentdates where paymentdate > a.duedate order by paymentdate asc) as paymentdate from tblDueDates a
  18. S

    Stop OnTimer Event when

    RefreshTableLinks generates an error string which your main sub displays. A better way to use functions that do something rather than return a distinct value is to set the function to true if it runs without error. This makes your code much more readable. You could move the error message to...
  19. S

    Date format to csv

    You are exporting directly from the table and the date field you are having problems with is a date datatype. Either : - specify the format on the table field (check if there is one set already), or - change the field datatype to text so that it stores exactly what is entered from the form...
  20. S

    Fielddescription action query

    I just wrote a simple function to extract text values. There is probably some meaningful structure in there but I don't know what is/can't be bothered to work it out. It's been a while since I used Access. As far as I recall, there are cases where table properties can be lost - when exporting...
Back
Top Bottom