Search results

  1. D

    change the background color of a query cell

    Is it possible to run a query and have the background color of the query field be highlighted if a certain criteria is met? I'd like to use the expresion builder if possible. For example if the values in field A and field B do not match, then field C should be a yellow background. If...
  2. D

    If no results then move to next qryDef....

    Thank You! if Dcount("*","qry_175") > 0 then Did it....
  3. D

    If no results then move to next qryDef....

    I can't seem to figure out how to write this IF statement. Any help is appreciated: See my commented out lines in the following code. .... 'open your query as RecordSource Set qdf = CurrentDb.QueryDefs("qry_55") With qdf qdfOLD = .SQL .SQL =...
  4. D

    .SQL Replace

    Thank You All ! This is all good information. In the end....this is what worked. I had to use a ! instead of . in my .SQL replace statement. I had to change my base sql query to use to single (') quotes, rather than double quotes ("). The new line looks like this: .SQL = Replace(.SQL...
  5. D

    .SQL Replace

    This code looks great. I'm trying to use it, but I keep getting the error "3625 - Item not found in this collection". I have the parameter value set as "01", not "prmo", does that matter? What am I not seeing? My code: Set qdf = CurrentDb.QueryDefs("i_qry_446_1") 'edit your base...
  6. D

    .SQL Replace

    Yes, I was particular about that. I copied it right out of the sql statement. I have the criteria of "01" in the design view of the query, would that matter? I would not think so, but I am at a loss on why this doesn't work.
  7. D

    .SQL Replace

    I have a make table query in MS Access. I want a variable in this query to change based on an array value. For some reason the .SQL Replace statement is not changing the value, even though when I debug and hover over the "x" array value it is there. My code is: Set qdf =...
  8. D

    zip a set of reports and email them

    I have a set of 10 reports that are produced using MS Access and exported to a folder on the network. My goal is to click a button on a form in MS Access, trigger some vba code that will zip this folder, attach it to an email and send it. Is this possible? I found this code that works for...
  9. D

    alter table with autoincrement field

    Thank You. That is what I will do. Create all the numbers and insert along with the other fields.
  10. D

    alter table with autoincrement field

    I apologize. I'm using an append query in order to insert into the oracle table. Yes, I can put the values in that way except there are 100's of rows, so to do it automatically seems appealing. Why doesn't the code below recognize the number I want to start with? It starts inserting at 1...
  11. D

    alter table with autoincrement field

    I am trying to use an append query to insert the data into the oracle table. I get an error that says the primary field can not be null. The oracle table primary field is just a number field....not autonumber; so I need to create the sequence of numbers to insert into it. But I don't want to...
  12. D

    alter table with autoincrement field

    I am attempting to update an oracle table using MS Access. One of the fields to be updated is a primary key number field. I'd like to use the autoincrement field to update that field. My sql is: Alter table testAutoNum Add column progid autoincrement (1001,2) This sql nicely creates the...
  13. D

    Set TableDef for multiple tables

    I am wrong. This code works fine. For Each tdf In dbs.TableDefs if (tdf.Attributes And dbAttachedTable)<>0 then tdf.Connect = strConnect_ssis Debug.Print tdf.Connect tdf.RefreshLink end if Next tdf I was getting confused by a different problem in my code...
  14. D

    Set TableDef for multiple tables

    Thank you. This looks good. However it isn't quite working yet for me. I think I need to set the 'tdf' to 'something' before the 'FOR' statement....otherwise it finds zero attributes / attached tables and goes no further. something like.... Set tdf = dbs.TableDefs("ssis_person") or Set...
  15. D

    Set TableDef for multiple tables

    all the tables are linked. I don't know what you mean by "type 6". This works if I link each table individually with the code I posted previously. I just didn't want to have to write so much repeat code.
  16. D

    loop with multiple arrays

    I am now getting script out of range. I see I might need to redim, but so far I'm not seeing how that works. Any help is appreciated.
  17. D

    Set TableDef for multiple tables

    I tried this and get a connection "runtime error 3219, invalid operation" It isn't recognizing the strConnect. What needs to change? thanks. Function ShowConnectInfo(strConnect_ssis) Dim dbs As DAO.Database Dim tdf As DAO.TableDef Set dbs = CurrentDb() For Each tdf In dbs.TableDefs...
  18. D

    Set TableDef for multiple tables

    I have the following function for tableDef that is working, but I don't want to have to repeat the code for each table. Can you tell me know to do this to include all the tables without repeating code? Function ShowConnectInfo(strConnect_ss) Dim dbs As DAO.Database Dim tdf As DAO.TableDef...
  19. D

    loop with multiple arrays

    Re: loop with multiple arrays -UPDATED- I have hit a wall in how to loop through an array. As it turns out I only need ONE array, but I'm so stuck I don't see how to do this. My code is below. highlighted are the places I want to insert array item one, then array item two, etc. I've looked at...
  20. D

    .sql replace for more than one field

    Yes. that worked well. Thanks.
Top Bottom