Recent content by nrgins

  1. N

    Solved Problem with using ByRef with a recordset field

    The example I gave with "Table1" was just a simple mockup I did of how it might actually be used. But in the real world it would be used with a recordset that would be at the correct record. So, yes, a single record would be modified. That's the intent.
  2. N

    Solved Problem with using ByRef with a recordset field

    Yes, of course. I guess I just didn't think it through. I mean, I would never set an object to a variant datatype within a procedure. I would use an object variable. But somehow the "ByRef" threw me off, and I didn't see it the same as setting a variable. But it is, since the parameter is a...
  3. N

    Solved Problem with using ByRef with a recordset field

    I used variants to account for the possibility of Null values being passed. And not trying to be clever. Just trying to save keystrokes. Sorry you think my coding is sloppy.
  4. N

    Solved Problem with using ByRef with a recordset field

    @ebs17: Ouch! OK, never mind. Have a nice day!
  5. N

    Solved Problem with using ByRef with a recordset field

    That makes sense. I'm curious, though, what you think of the article that gasman shared, above. Unless I'm reading it wrong, it seems to say that fields are modifiable. What is your take on it?
  6. N

    Solved Problem with using ByRef with a recordset field

    Thanks! That certainly addresses the issue. The only is, that article lists fields as modifiable, and only lists "Read-only variables, fields, and properties" as non-modifiable. The field I passed was definitely modifiable. ??
  7. N

    Solved Problem with using ByRef with a recordset field

    You had changed the function so that it didn't increase the value of the first parameter, but only added them together as a return value. The original function simply had: varBaseAmt = Nz(varBaseAmt, 0) + Nz(varNewAmt, 0)
  8. N

    Solved Problem with using ByRef with a recordset field

    Yes, it works if you return a value from the function. But then that defeats the purpose of using the function in the first place, since you're still repeating the value to be added to twice.
  9. N

    Solved Problem with using ByRef with a recordset field

    Yes, that's what I ended up doing. And, yes, it works if you do it the standard way. And, no, error notification's in place. In fact, both functions have error handlers in place. I just removed them for posting here.
  10. N

    Solved Problem with using ByRef with a recordset field

    So, I have a function that's meant to emulate += in Access to add a value to another value without having to repeat the first value. It's a simple function: Public Function pe(ByRef varBaseAmt As Variant, varNewAmt As Variant) varBaseAmt = Nz(varBaseAmt, 0) + Nz(varNewAmt, 0) End Function...
  11. N

    Issue with Search Key Not Found Error

    This isn't a self-assigned index. Access assigns indexes automatically based on the values under Options | Object Designers | Autoindex on import/Create, which as by default set to: "ID;key;code;num." Thus, any field that contains one of those text strings will be assigned an index by Access...
  12. N

    Issue with Search Key Not Found Error

    Well, actually, I think what you said about it being a corrupted index would explain why it's a single field that has problems, instead of the entire record. Since each indexed field has its own index, then that would explain why a single field has the issue, if it is only that field's index...
  13. N

    Issue with Search Key Not Found Error

    Thanks for that. I'll give that a try. I'll note, though, that this is an intermittent problem. Over the past years, we've been getting it once in a while. Then we went about 8 months without an occurrence. Then, last month, it started happening maybe once or twice a week. So this is just...
  14. N

    Trapping System Errors in a Global Module

    Thanks for the insights. The fact remains, though, that I don't think keeping Word open would work for me, since sometimes the document is opened in Word for review and possible printing; other times (as in this case), it's created in Word, exported to PDF, and then Word is closed. So, since...
Top Bottom