Recent content by It_thug

  1. I

    Incremental values based on Column value and row

    Thank you for your answer. I didn't mention that this would be for VBA in Access. However, that being said.... for what I'm doing, I think doing it in Excel is absolutely a valid option, and may be a lot easier than what I was working towards.
  2. I

    Incremental values based on Column value and row

    What I need, is to populate a column with incremental number based on 1 column and the previous rows result. Will be easier to see it. Let's says I have the following: ID_NUM RPT_YR CS 1 1989 0 1 1990 0 1 1991 1 1...
  3. I

    So Confused on an Exists code

    see previous post. It was still giving the error. But I found the setting that was causing the problem. Now it is working as it should. Thank you again.
  4. I

    So Confused on an Exists code

    FOUND IT! The Options were set to break on All errors. Changing it to "Break on Unhandled Errors" resolved the issue. I must have made that change for some unknown reason, or maybe a patch. I don't know. But it is now working as I need it. Thank you all again for your help. I have most...
  5. I

    So Confused on an Exists code

    Something is really odd. It's not doing the On Error part. It's just getting hung up on the error it's self. (which is 7874, so the original code should work. But it doesn't seem to.) Is there something that could make the On Error just not work as it should? I think I might be confusing...
  6. I

    So Confused on an Exists code

    Ah... awesome. I love this forum. I hope that someday I'll be proficient enough with this to help others like I have been helped.
  7. I

    So Confused on an Exists code

    Again, thank you for your time. But the problem with the above is that I don't want it to give an error if the object doesn't exist. If it doesn't exist, it just needs to move to the next step and create it from scratch.
  8. I

    So Confused on an Exists code

    Very nice... thank you very much for your time on this. I'm still learning as I go. I very much appreciate it.
  9. I

    So Confused on an Exists code

    Agreed on your statement. (I edited the above, hoping to get it before you got back... oops) But yes, I need to check to see if something is there and delete it if it is and if it isn't move on to the next part. The following does it. But I'm not sure it's the best option. Anyway, I do thank...
  10. I

    So Confused on an Exists code

    okay, fair enough on the RTFM comment. Still not sure how it was working and now doesn't. Isn't the line for On Error Resume Next suppose to skip it? or is what is coming back not considered an error? Anyway, I removed that check and made it the following, which works as I need it to. On...
  11. I

    So Confused on an Exists code

    oh.. so my question is twofold 1- why isn't it working now? 2- Is there another way to determine if a query exists? and if so, delete it? The purpose of this is to create ad-hoc queries for someone. And this part of the code is in there so that if the person tries to create the same table...
  12. I

    So Confused on an Exists code

    OKay, this code has been working for a while now. Today, I open up the database and test it before moving on to another project and it is no longer working. And I don't know why. On Error Resume Next Exists = IsObject(CurrentDb.QueryDefs("NameofQuery")) If Exists Then DoCmd.DeleteObject...
  13. I

    VBA IF then Else's

    couple extra Var_Ids in there right now.. but it's the gist
  14. I

    VBA IF then Else's

    Thanks much all.... Here is what I ended up with Dim myConnection As ADODB.Connection Set myConnection = CurrentProject.Connection Dim myRs As New ADODB.Recordset Dim mySQL As String myRs.ActiveConnection = myConnection Dim VarName As String VarName = TempVars!VarName mySQL = "SELECT...
  15. I

    VBA IF then Else's

    Thanks. I'm not sure how it will all work out yet. What prompted all of this is that I'm taking 3 different Access Tables with 3 distinct ways of pulling data and combining them all into 1. All three are similar in what they do but not quite the same and they reflect the knowledge from the time...
Back
Top Bottom