Search results

  1. graviz

    Case Statement Help Please

    I have a function that converts a number of days field into 30 day buckets. I've been asked to keep increasing the number of buckets so I was wondering if there was a way to do it with a loop of some sort. It would always be in increments of 30 and it could say either "60 Days" or "2 Months"...
  2. graviz

    Text To Number Conversion

    Yes there will be some nulls contained in the data, which is why it needs to be converted after the fact. Any ideas?
  3. graviz

    Text To Number Conversion

    I have some vba that dump an access table into a recordset and then into an excel spreadsheet. When the data is exported Columns I:Q (which are numbers) appear as text (with the green triangle in the upper left corner). I have a pivot table that refreshed however it can't do anything with...
  4. graviz

    Simplify My Code

    I've been getting better at VBA over the past couple years however I'd like to try and learn how to simplify/condense my code. The code below allows me to output a query "02_08_Overall_Latest_Week" to a specific tab and cell. The "Call Init_Paths" is just where I have my paths stored so I can...
  5. graviz

    Simplify If Statement and Loop Code

    I'm only testing one field in my queries "service_code_string" In your case statement it appears it would only yield one of those results if the field was equal to for example "60". The problem is that field would have a lot more codes in addition to the one I am looking for. Here's what's...
  6. graviz

    Simplify If Statement and Loop Code

    The only thing is I need it to search through a field. The field it is testing against is setup like so: "rr;qe;60;2p" and so on. Would you code work for that?
  7. graviz

    Simplify If Statement and Loop Code

    Is there any way to simplify and shorten my code. It works but I feel like I could shorten it somehow. Function DishNet_Converted_Type(service_code_string As String) As String Dim CodeArray, i As Integer NC_CodeArray = Array("60") CH_CodeArray = Array("64", "74", "8.", "R=") TC_CodeArray =...
  8. graviz

    VBA Function Creation

    Chris (and everyone) thanks for all your help on this. I agree putting the codes in a table makes sense. I'm just having a bit of trouble understanding the code as I've never ref a table. What is the "!Code" and " intType"?
  9. graviz

    VBA Function Creation

    Sorry I guess I wasn't clear on what I was looking to do. I still want to two seperate functions however I would like to make a 3rd one that yeilds 3 results as shown above.
  10. graviz

    VBA Function Creation

    I created two functions to use when I'm pulling data using a query (QBE). I would like to combine the two into a 3rd Function that works like this: BB_Only = DishNetActivityCode = 1 and VideoActivityCode = 0 Hybrid = DishNetActivityCode = 1 and VideoActivityCode = 1 V_Only =...
  11. graviz

    Disable Send Mail

    I have designed a form in excel that I need the user to fill out completely before they either send or save the file. I currently have code (see below) that prevents them from saving it however they're able to email it as an attachment. I've seen many posts on disabling the ribbon however I want...
  12. graviz

    InStr Function Help

    For now it is but in the future it may increase. Could I use the same array logic if it does? If InStr(service_code_string, pattStr(fCtr)) = 0
  13. graviz

    InStr Function Help

    Work Order #1 Service Code AA BB CC DD EE Work Order #2 Service Code AA CC DD I want all work orders that have AA & CC but not BB. So I wouldn't want work order #1 eventhough it have AA & CC because it also has BB. How bout now?
  14. graviz

    InStr Function Help

    That's what i thought. I have a service code string where I need to make sure I'm including work orders that have those codes (the 28) but don't have others (i.e. those 3) Does that make sense?
  15. graviz

    InStr Function Help

    I'm assuming if one of the service codes contains a "," then I would just use a different notation to seperate the codes by? First time I've seen that function. Here's a curve ball. I was gioing to create a second function to exclude 3 codes: 6; ;$ and 82 Could I integrate it into this one...
  16. graviz

    InStr Function Help

    Actually looks like I got it to work. Here is my code: Function DishNetProg(service_code_string As String) As Integer If InStr([service_code_string], "KV") Then DishNetProg = 1 ElseIf InStr([service_code_string], "KY") Then DishNetProg = 1 ElseIf InStr([service_code_string], "KT")...
  17. graviz

    InStr Function Help

    Thanks for the help! What is the <> 0 do for the statement? Could you just leave it out?
  18. graviz

    InStr Function Help

    Based on what I'm trying to do would you be able to help me with the code? I've never created a function to use before.
  19. graviz

    InStr Function Help

    Is it possible to write a function in vba and use it in QBE mode in access (using the expression builder)?
  20. graviz

    InStr Function Help

    So I'm going to have 28 codes to search for in one field. Is that the best way to handle it without using SQL?
Back
Top Bottom