Search results

  1. C

    get part of a string according to delimeter

    Hello, I am trying to retrieve from the following string the numeric part into 3 different variables str="7449_9968_12438" i was able to get first and last set of characters var1=Left(str, InStr(str, "_") - 1) var2=Right(str, InStr(str, "_")) but i cant figure out how to get the middle...
  2. C

    if not isNull with wrong result

    for the kind help thank you all Me.MyDate = Null, works just great
  3. C

    if not isNull with wrong result

    I noticed that this behaviour happens after i press a button in the form where the text control is located , and by pressing that button I delete the text in the textbox Me.DataM = "" after this is done if i run the if then condition , i get the undesired result, but if i close the form and...
  4. C

    if not isNull with wrong result

    Hello everybody, i do have the following if then condition: If Not IsNull(Forms![frmMagicCont]![Procura de Documentos].[Form]![DataM]) Then a=1 else a=2 end if in my inmediate window i checked the value of the DataM control, and it returns nothing, i also tested the lenght with ...
  5. C

    retrieve numeric part of string

    arnelgp, thanks for your example that works like a charm also great examples with split and isnumeric(), , that i will certainly try
  6. C

    retrieve numeric part of string

    Hello, I would like to retrieve the numeric part of the following string into 2 integer values: dim y as integer, h as integer, mystr as string mystr="Year 2001 Mileage 2500 m/h Power " 2001 would go to the variable y, and 2500 to the variable h i gather that if i use replace to gtrim the...
  7. C

    Mute/Unmute sound

    Gasman, i will try that code on the link you sent me , and let you know how it went thanks
  8. C

    Mute/Unmute sound

    Hello, Is it posible to turn off the sound on my PC with VBA on a specific event ?
  9. C

    run code on timer

    Many thanks, it works great
  10. C

    run code on timer

    arnelgp, Your code seems to work as i intended, I am going to study it so that i can figure out why it does not run the code on the timer event (wich is what i wanted), when the next the field !hora is 4 hours later than the current time.Nevertheless in the botton left corner of the access...
  11. C

    run code on timer

    I am sorry, i wanted to make more simple, and ended up messing it up, this is the code that executes every 60 seconds on the timer event Dim strPath As String, horaAgora As Date, horaAcao As Date, ruidoID As Integer, n As Integer Dim db As Database Set db = CurrentDb() Dim rstRuidos As...
  12. C

    run code on timer

    Hi, I am wondering if this is posible : On the timer event of a form i am running a code every 60 seconds With rstC ' ( the recordset is sorted by the field !hora, wich is a time field) Do While Not .EOF If !jaEsta = 0 And now() >TimeValue(!hora) then ' here i do something...
  13. C

    top 30 records programaticaly

    Many thanks, it´s working just fine Set MyQryDef = db.CreateQueryDef("") strSQL = "SELECT TOP " & n & " closecot FROM tblCotacoes ORDER BY closecot Desc" MyQryDef.SQL = strSQL Set rs = MyQryDef.OpenRecordset(dbOpenDynaset) rs.MoveFirst: HighNumber = rs!closecot rs.MoveLast: LowNumber=...
  14. C

    top 30 records programaticaly

    Hi, That realy helped, I am closer now. I do get the last n records(30) with the following : strSQL = "SELECT TOP " & n & " closecot FROM tblCotacoes" MyQryDef.SQL = strSQL but of those records I would like to get the highest one, so I did this instead : strSQL = "SELECT TOP " & n & "...
  15. C

    top 30 records programaticaly

    Hi, I am not sure If I am looking at this the right way. I want to get the highest number of the field "closecot" of qryCotacoes, considering only the n last entered records, in this case n would be a parameter. I understand that in a select query I would set field parameters with : n=30...
  16. C

    get the numeric part of a string

    Hello, Thank you all for your comments, very helpfull I ended up going with GK sugestion, of spliting with character ":" , and afterwards change the string into a number It's working fine
  17. C

    get the numeric part of a string

    Hello, I have splitted the following string by the comma character, so I have now an array containing 6 strings, and now I would like to pass the numeric value of each one to a variable. }, "Time Series (Daily)": { "2020-08-31": { 'stored in...
  18. C

    Set parameters of a form Chart

    Hi, I ' ve been trying to set the parameter values of a trend line in a chart with VBA I was able to set the minimum and maximum values of the Y value of the chart with this, in the onActivate event of the form : Dim objChart1 As Object Dim objAxis1 As Object Dim max As Variant, min As Variant...
  19. C

    error sumbitting IE form

    huummm, neither ie.Document.Forms(1).Submit or ie.Document.Forms(0).Submit manage to submit the form. I was wondering if it is posible to catch the alert, and right after sendkeys(enter), to resume the code if you think this would be a posibility, how can I catch that alert ?
  20. C

    error sumbitting IE form

    Hi, I am not sure the button executes a function. I guess not, because this is the html in that button element : <button type="button" class="btn primary-button" id="btn-search-header">Pesquisa</button>
Back
Top Bottom