Search results

  1. T

    trying to import worksheets

    Hi all, Basically I'm trying to import each worksheet, but each one needs something different done to it on import so I'm using a for loop: Private Sub Command32_Click() 'import master data click Dim MyXLApp As Excel.Application Dim MyXLWorkBook As Excel.Workbook Dim MyRange As...
  2. T

    vbscript question

    good point. It populates the csv file but no data in it. here is the full code: ' Where are all the girls? You said there'd be girls dim cmd, cn, rs, objRoot, objFSO, objCSV, q const FileName ="domaincomputers2.csv" set cmd = createobject("ADODB.Command") set cn =...
  3. T

    vbscript question

    this loop isn't working: for each ServerName in ServerList wscript.echo ServerName q = """" if rs.eof <> true and rs.bof <> true then objcsv.writeline(q & rs("name") & q & "," & q & rs("operatingsystem") & q & _ "," & q & rs("operatingsystemservicepack") & _ q...
  4. T

    for each loop...I think

    just keeps saying expected = so I was thinking something like this: If (DoCmd.RunSQL("SELECT master.[asset number], desttable.[asset number] FROM master, desttable WHERE master.[asset number] = desttable.[asset number];")) Then DoCmd.RunSQL ("UPDATE master.[destroyed] = Yes;") but that...
  5. T

    for each loop...I think

    is it possible to do something like this? for each record in a table if table1.field = table2.field then update table1.field2 = yes else next record I've been looking through the MS help and it doesn't really tell me much, using access 2010 if so, how would I go about doing this? Thank you
  6. T

    wildcard on a text string

    haha I was so close, I tried: strWhere = strWhere & "([Asset Description] Like """&"*" & Me.txtFilterAssetDescription & "&"*"") AND " and being a noob I'm happy that I was so close on my own before I came here Thank you I'll test it out soon :)
  7. T

    wildcard on a text string

    Hey all, I'm using Allen Browne's wonderful search sheet(http://www.everythingaccess.com/tutorials.asp?ID=Build-a-search-criteria-form) and tweaking it for my own purposes and I would like the below text box to be wildcarded on each side, is this possible? strWhere = strWhere & "([Asset...
  8. T

    deleting a table variable

    im importing a workbook and they just come with it into a temp import table and then an append query is run after that. this now isn't working though: DoCmd.RunSQL "INSERT INTO Transactions ( [Asset Number], LOCATION SELECT Master.[Asset Number], Master.LOCATION FROM redisttable INNER JOIN...
  9. T

    deleting a table variable

    that code works perfectly though and I'm just deleting import error tables cos this stupid spreadsheet import imports a bunch of pointless crap with it
  10. T

    deleting a table variable

    oh I'm such an idiot! that's all it was thanks bro :)
  11. T

    deleting a table variable

    Hey lovers, I need a kick in the right direction here, trying to delete (or atm just print to msgbox) a variable table name to get rid of any import errors I might get - they wont be important anyway. it cycles through everything sweet but it wants to delete everything.... Any ideas? Dim...
  12. T

    normalizing my data...help

    I've been doing some reading, and where I'm going wrong is, the relative field in every table isn't really viable. Like the only way I can actually link all the tables is to have the foreign key as primary ID autonumber or asset number, if I'm going to put that in every single table I may as...
  13. T

    normalizing my data...help

    I thought I had normalised all my data, and then when I ran the query to put it all together it showed the same record a million times over and crashed the DB. So if I could get a hand just telling me what I need to do to normalize this properly I would be forever in debt. The Master Table: UID...
  14. T

    finding a condition in a query

    i found it :D - indexed - yes duplicates OK
  15. T

    finding a condition in a query

    k so basically we've got a bazillion assets that have been kept in spreadsheets and someone said hey man can you make us a database? SUUURE I said *raise middle finger* Anyway so everything is kept in seperate spreadsheets, so I've got an import button that lets you select the sheet to import...
  16. T

    finding a condition in a query

    ohhh it wont add dupes, it only adds unique values, if i delete everything fron transactions it only gets 22 key violations if i run the query twice all records are a key violation. I hope that makes sense, by the way what was for dinner? :)
  17. T

    finding a condition in a query

    yeah that's cool that part is right and I am forever in debt to you. but I'm only updating the main table with the latest location, but I want to keep old locations in the transactions table for that assets ID, because I have a subform that's a history which reads off transactions. so at any...
  18. T

    finding a condition in a query

    but some assets move around three or four times before they're decomissioned, won't an update query just update the existing fields not re-add new entries? or will it be different because the locations will be different, hence, new record?
  19. T

    finding a condition in a query

    it wont add them due to key violations, is that because im trying to copy the primary key from master into transactions? To keep space down I'm just copying two fields.
  20. T

    finding a condition in a query

    hahaha that made me laugh so hard I almost spat coffee on my monitor! how's this looking? INSERT INTO Transactions ( id, LOCATION ) SELECT [Master Without Matching redisttable].UID, [Master Without Matching redisttable].LOCATION FROM [Master Without Matching redisttable] WHERE (((Exists...
Top Bottom