Search results

  1. D

    QueryDef with parameters - item not found

    this code: dim var for each var in currentdb.querydefs("qry_55").parameters debug.print var.name next showed me the var name. It looked the same as what I had in the code. I decided to copy the name from the sql and insert it to be certain it was exactly the same. That fixed it. Then I...
  2. D

    QueryDef with parameters - item not found

    Thank you that showed where my problem was.
  3. D

    QueryDef with parameters - item not found

    I am getting an error. Item not found in this collection - runtime error 3265. I've searched online for the answer and I found that it is due to something incorrect in the spelling, etc. However, I have checked and rechecked. The query name is qry_55 The field is c.cnty_cd - However this query...
  4. D

    .sql replace for more than one field

    I'd like to use the follwong code to replace more than one field in the query. Can you tell me how that is done? Dim qdf As DAO.QueryDef Dim qdfOLD As String Set qdf = CurrentDb.QueryDefs("qry_55") With qdf qdfOLD = .SQL .SQL = Replace(.SQL, "c.cnty_cd = '01'", "c.cnty_cd='11'") '...
  5. D

    loop with multiple arrays

    This works well to get my recordset. I'm searching for the way to loop through my array and insert into my replaced value rather than the hard coded value. Any advice is appreciated. thanks. 'you need to open your query as RecordSource Set qdf = CurrentDb.QueryDefs("qry_55") With qdf...
  6. D

    loop with multiple arrays

    To be more clear I think this might help. I want to be able to: ~open a main database and stay connected to it. ~open the first database in myConnect2Array. ~insert into all the necessary places in my queries (now it has [enter cty]) with the first myCtyArray. ~export results to a location...
  7. D

    syntax help on join sql

    Yes. That worked. thank you.
  8. D

    looping through multiple databases

    I am confused on what forum this belongs on, but I have come a bit further on this issue it is posted at: http://www.access-programmers.co.uk/forums/showthread.php?t=273734 On the vba forum. Thanks for any help.
  9. D

    loop with multiple arrays

    I need to loop through two arrays changing the value in one field from the query and I cannot see how this is done. My code is below with my problem area highlighted in red. Instead of the qry55, I could insert the sql into this code, but that seems like the wrong path to take. Thanks for...
  10. D

    syntax help on join sql

    The syntax is not correct on this sql to use in MS Access. Can you help? I think I need brackets around the joins and/or 'inner' before the join.... select p.sw_index_id, [P.LAST_NAME] & ', ' & [P.FIRST_NAME] AS PERSONNAME1, cp.cnty_cd, p.ssn, p.last_chgd_dt, an.gender_cd, p.birth_dt...
  11. D

    translate oracle 'decode' to sqlserver 'case'

    Thank You....The following works for me! switch(alleg_determ_ind = 'Y', 'Y') AS md
  12. D

    looping through multiple databases

    I am not sure what way to do this. I'll give some back ground. I have a query that this sql runs, which produces a report. This query needs to run multiple times, each time pointing to a different database (myDbArray) and with a different ctyCd (myCtyArray). My goal is to automate this so...
  13. D

    translate oracle 'decode' to sqlserver 'case'

    I am trying to translate plsql (oracle) to sql for access (sql server). This is the plsql line of code: decode(alleg_determ_ind, 'Y', 'Y') as md The follwing are things I've tried, but none of them work: Select..... CASE alleg_determ_ind WHEN 'Y' THEN 'Y' ELSE 'N' END md CASE...
  14. D

    looping through multiple databases

    I need to create a loop that changes two items and I don't know how: 1 the variable in the sql - (c.cnty_cd = '11') 2 the database in the sql - (salti_person11) so that each time the sql runs a new item from the array is inserted for each of these. Any help would be appreciated. Dim...
  15. D

    looping through sql and skip if not result set found

    When I run the following sql (in a query) I enter information once for [enter cty id]. and it all works fine. What I would like to do now, is write the vba code so that the sql runs multiple times looping through a list of items. For instance instead of the popup window asking "enter cty...
  16. D

    coverstion from plsql to sql in MS Access

    ISSUE RESOLVED: I just deleted the following line from the sql and put ascending order in the query design. ORDER BY [a.LAST_NAME] & ', ' & [a.FIRST_NAME], personname; Thank you so much!
  17. D

    coverstion from plsql to sql in MS Access

    Thanks! It is working now except for one odd thing. I had to do some edits to the following line and the query works fine, except it brings up at pop up box asking for the personname. I leave it blank and it runs okay, but do you have any ideas how to get rid of that box? [a]![LAST_NAME] & '...
  18. D

    coverstion from plsql to sql in MS Access

    I am trying to convert an sql statement from an oracle based platform to use it in MS Access (sql server platform). I'm getting a syntax error (of course), but I can't see where the problem is. The sql is below. Any help would be appreciated. select a.south_index_id, c.cnty_cd...
  19. D

    combo box to search over 100k records

    I would like to offer the solution I found for anyone else who might need it. Allen Browne's code is excellent for finding a record, however if you need to edit the record once you find it, you need to change the following code: Use Allen Browne's code then..... In the combo box on change...
  20. D

    combo box to search over 100k records

    This is a database has two tables. Person and Address. It holds addresses for over 100k people. When searching these records the user only has a name, so cascading combos won't work. The code at http://allenbrowne.com/ser-32.html works for looking up by last name, first name, personID by...
Back
Top Bottom