Search results

  1. R

    error 13 type mismatch with Dir()

    The dir() function responds with the name of a file if it finds one, or with an empty string if it does not. So the correct syntax for testing of a file exists is: If Dir(strName) <> "" Then
  2. R

    Q:how to call a method with a variable number of parameters?

    wait a minute. Plog and I had this conversation earlier in this thread: >I thought it was me at first, but PLOG's own example code fails with "cannot find the name Str1" Sub PlogTest() str1 = "Hello" Eval ("MsgBox(str1)") End Sub >I got quote mark happy. This should work: Sub PlogTest() str1...
  3. R

    Q:how to call a method with a variable number of parameters?

    No that won't work. you cannot place a variable INSIDE a string. MyObject is a variable. evalstr=Chr(34) & param1 & Chr(34) & " , " & param2 & Chr(34) strresult=Eval(MyObject.MyMethod(evalstr)) EDIT: NO NO NO --- I have that WRONG (I wish this editor had strike through) SHOULD (NOT) work...
  4. R

    Get email addresses from table

    You do? I prefer ADO (fewer lines) Dim objIdxStatus as Object Set objIdxStatus = CurrentDb.OpenRecordset("tblIndexStatus") with objIdxStatus .movefirst .... And YES you need it.
  5. R

    downloading a JSON file and updating database

    absolutely it can be done. there are modules out there for it google: access clsReadTextFile access InternetGetFile
  6. R

    Get email addresses from table

    use DAO or ADO (google them) to set an object reference to the table, then its a do ... loop to loop through the records and *similar* code to your button to send mail
  7. R

    Q:how to call a method with a variable number of parameters?

    Yeah, I saw that. Thanks, but you two are totally off-topic. I'm not trying to WRITE a method. I'm not trying take in an odd number of parameters. I'm trying to CALL an existing method, and GIVE it an odd number of parameters. depending on data in a table. Clearly Eval() is in the right...
  8. R

    Q:how to call a method with a variable number of parameters?

    Hi guys, here’s the update: I’ve been wrestling with this for most of the day, it’s definitely a problem with the Eval function combining with myObject and myMethod, and it’s causing Access to abruptly quit out. As soon as it gets to that line of code Access just shuts down. Using MSA 2007...
  9. R

    Q:how to call a method with a variable number of parameters?

    UPDATE: Thanks plog, that's better. but now all of ACCESS JUST EXITS when it get to that line of code str1= "foo","12","bar","43","foo2","89" Eval(MyObject.MyMethod (str1)) --- poof! 5pm: time for a pint. back to this in the morning
  10. R

    Q:how to call a method with a variable number of parameters?

    Sorry, its a commercial app, a couple of hundred MB compressed. I'm almost there. Access help talks about about Eval() using Functions. I'm trying to call a method of a COM object. maybe I need to wrap that in a function!
  11. R

    Q:how to call a method with a variable number of parameters?

    Hi Guys, It definitely looks like Eval() is what I'm looking for ... but... IT DOESN'T WORK! :banghead: I thought it was me at first, but PLOG's own example code fails with "cannot find the name Str1" Sub PlogTest() str1 = "Hello" Eval ("MsgBox(str1)") End Sub Doesn;t matter if I enter...
  12. R

    Q:how to call a method with a variable number of parameters?

    OOOHHH. it is a string but the "MyObject.MyMethod (" and ")" bit is part of the string then we EVAL string!
  13. R

    Q:how to call a method with a variable number of parameters?

    Given that this works: MyObject.MyMethod ("foo","bar") this would work: str1 = "foo" str2 = "bar" MyObject.MyMethod (str1,str2) but this will not: str1= Chr(34) & "foo" & Chr(34) & "," & Chr(34) & "bar" & Chr(34) MyObject.MyMethod (str1) even though str1 = "foo","bar" it is still one...
Back
Top Bottom