Search results

  1. I

    Need helt developing either a que-system or an effective anti-concurrency function.

    Hi there! I have been searching different forums, but I can't seem to find any answer to this excact issue, and this is without doubt the best access forum, so here goes. I have a little project with a few different challenges. This might be a little long to read, but I would like to just...
  2. I

    Problem comparing dates in If sentence

    Yeah, i know, sorry. I was getting so confused, as I really believed I had gotten it to work without US format or CDate or DateSerial, and that you might have misunderstood the structure of my base, but that, of course, wasn't quite the case :) In one moment the database seemed to work perfectly...
  3. I

    Problem comparing dates in If sentence

    Ah, I see :) I have now tested the script and counted the outputs, and it's counting and comparing correctly. I left the Date field from the table the way it was, and changed the user inputs to US format with DateSerial :) Finally, it seems there are no more errors. Thx a lot guys :) As...
  4. I

    Problem comparing dates in If sentence

    Actually, No, It is a Medium Date field, so no need for DateSerial there i guess. But I would still need to change it to US format right? So how could I do that without loosing the Date value? First convert it to text and move around the MM and DD, and then CDate again?
  5. I

    Problem comparing dates in If sentence

    Okay :) Trying DateSerial now Something like this then? : tekst27us = DateSerial(Right(Tekst27, 4), Mid(Tekst27, 4, 2), Left(Tekst27, 2)) tekst29us = DateSerial(Right(Tekst29, 4), Mid(Tekst29, 4, 2), Left(Tekst29, 2)) Do Until rst.EOF = True If IsNull(rst!Dato) Then DatoUs = "" Else...
  6. I

    Problem comparing dates in If sentence

    Yeah, I also just figured out that it still didn't work perfectly.... Seems i need some kind of function... Cdate or something :p :D I have now added Cdate to my script :D Tekst27ustemp = Mid$(Tekst27, 4, 3) & Left$(Tekst27, 3) & Right$(Tekst27, 4) Tekst29ustemp = Mid$(Tekst29, 4, 3) &...
  7. I

    Problem comparing dates in If sentence

    Hahahaha :D Yeah, yeah, i get it :p It's faster for my users to enter the dates manually than to use a date picker, so i will stick to the hard way :) I used this: DatoUS = Chr(35) & Mid$(rst!Dato, 4, 3) & Left$(rst!Dato, 3) & Right$(rst!Dato, 4) & Chr(35) And it works like a dream :) Thx...
  8. I

    Problem comparing dates in If sentence

    Dammit, I see now that it is still a bit wrong cause of the European date format! It isn't an option to have my users enter dates in US format, and the table of which I am comparing the dates against, also must have European format :p So is there a function to convert the dates from European...
  9. I

    Problem comparing dates in If sentence

    Hahaha! Great! That solved it! I just wish i knew a few hours earlier :p I've been sitting for hours programming these lines into my database :p If (Format(Format(rst!Dato, "mm/dd/yyyy"), "General Number")) >= (Format(Format(Tekst57, "mm/dd/yyyy"), "General Number")) And...
  10. I

    Problem comparing dates in If sentence

    I found a solution :) Converting the dates to general numbers seem to work, but will this make correct sorting? If (Format(rst!Dato, "General Number")) >= (Format(Tekst27, "General Number")) And (Format(rst!Dato, "General Number")) <= (Format(Tekst29, "General Number")) Then...
  11. I

    Problem comparing dates in If sentence

    Yeah, that makes sense, changed it to a Date field now :) And you are absolutely right about the sorting by characters, as this isnt working: If "05.04.2008" >= "01.01.2009" And "05.04.2008" <= "01.01.2009" Then MsgBox "check" TextFile.WriteLine (rst!Medlemsnr) End If But this is...
  12. I

    Problem comparing dates in If sentence

    Yeah, I was looking for an If sentence like that, I tried "&" without any luck :p I don't think there is any problem with the Date format, as it is comparing a text field where the user enters DD.MM.YYYY with a field from the table which i know is also DD.MM.YYYY. Msgbox(Tekst27) and...
  13. I

    Problem comparing dates in If sentence

    Hi Again :) I have another If-related problem... If rst!Dato >= Tekst27 Then If rst!Dato <= Tekst29 Then TextFile.WriteLine (rst!Dato - rst!Medlemsnr) End If I am trying to make an If sentence compare if the field [Dato] from a table I have is greater than the Text field "Tekst27" and...
  14. I

    Problem with setting a value in an If statement

    Absolutely perfect! :D Thx :)
  15. I

    Problem with setting a value in an If statement

    Hi there!:cool: I am trying to use an If sentence to determine whether a combinationbox is "Bestilling" or "Bestilling_ut" and then set a variable to one of two values. If Kombinasjonsboks11 = "Bestilling" then forlag = Landsetting If Kombinasjonsboks11 = "Bestilling_ut" then forlag =...
  16. I

    Dcount problem

    I am back to say that i had to use "0" as the empty value anyway, as the database seemed to be skipping posts when i used nothing. And your way worked perfectly, Wayne! But i got "Data type mismatch in criteria expression" when i tried to work with "0", but as i replaced it with chr(48) the...
  17. I

    Dcount problem

    I just wanted to count all the values that were not "0". But I found a way to use "" instead of "0" now :p using "0" just made more and more problems Thx though, but I'll use the Not isnull([Medlemsnr]) function :) it works perfectly
  18. I

    Dcount problem

    Omg, sorry for triple post. Seems that it wont really be possible to change this, 'cause of relations and such, so I if anyone still have a hint, I'd be thrilled :)
  19. I

    Dcount problem

    As i am rewriting my table to having "" instead of "0" as the default value for no schedule, it all seems to be working with "Not isnull([Medlemsnr2]". So then i guess I'll just be doing some rewriting then :p
  20. I

    Dcount problem

    Great :D I think we might be on to something. But now i get "Data type mismatch in criteria expression". Which is an error i have been getting a lot lately.
Back
Top Bottom