Search results

  1. B

    Formatting Tables with VBA

    So, I want to insert an iterative calculation into successive columns of a table. Using a loop, I calculate the first the number as use INSERT INTO Table1 VALUES Number1. Then do the same for Number2, Number3....etc The result is each calculation on its own record, when I want it all in one...
  2. B

    SQL Variables

    Okay, so now I need to try and append all my data to a single table. Final Table = "Apple 2010" Tables to Add = "Apple March" "Apple April" "Apple June" "Apple July" Fields to Append = "Product Ordered" "Days Received" I tried using an append query, but I cannot append data from the same...
  3. B

    SQL Variables

    That gave me Error 94 - Invalid use of Null. You are right though, it is a field of that table. It is okay if Dlookup only retrieves the first value because I can just loop through the database and replace each first value. Although, I used an update query and it seems to have solved my...
  4. B

    SQL Variables

    I am going to try to use the replace function. In order to do this, I need to read the values I want to replace from my table. I want to read text values from a field called 'DAYS RECEIVED'. I tried using DLookup, and received a 2001 error. My syntax is: Dim LResult as String LResult =...
  5. B

    Defining Global Variables

    Chipper, that worked well. Thank you!
  6. B

    Defining Global Variables

    I want to define, not just declare, a global string array for use in all my subs and functions in my module. I know how to define a global function, but I can not call this function in the same way I could call an array. I could use a class, but I want all the code to be in the same standard...
  7. B

    String Arrays and Function Calls

    Thank you Chris. Your method worked just fine and helped me to learn more about VBA.
  8. B

    SQL Variables

    I certainly agree with the GIGO principle, but I think it would take less man-hours to simply write some code rather than go back and fix it all at this junction. I have raised the point about standardizing how we fill out this field, but of course, this will only be applied to new projects...
  9. B

    SQL Variables

    So, I need to create a query to read values from a table that was created my multiple people. Some people wrote in the Days Field: 1,2,3,4 While others wrote: 1.2.3.4 While others wrote: ALL I could just clean up the data, but that might be futile because if we ever want to add data with an...
  10. B

    String Arrays and Function Calls

    Okay that does teach me some things about how to use variable strings. Just to be clearer, I kind of wanted something like this: Strings1(0) = "C" Strings1(1) = "C#" Strings1(2) = "F++" Strings2(0) = "Table 1" Strings2(1) = "Table 2" For i=0, i<2, i++ { For j=0, j<3, j++ {...
  11. B

    String Arrays and Function Calls

    I have some very important code that I need to write myself but am relatively new to VBA. I need to be able to: 1.) Obtain the field names of a query 2.) Place those field names in a string array 3.) Use the string array in looped a function call I found some good tutorials on the first two...
Back
Top Bottom