Search results

  1. A

    formatting number without trailing zero's

    You certainly led me in the right direction! Here's what I ended up with =IIf([price]=0,Null,"$" & IIf(Right(Format([price],"0.000"),1)=0,Format([price],"Fixed"),Format([price],"0.000"))) Thanks guys! Joe
  2. A

    formatting number without trailing zero's

    I have a similar problem, but the above solution didn't seem to work for me. I have an instance on a report where the price column can go past 3 decimal places ($0.003). However many of our prices are listed in the standard 2 decimal place convention ($5.00). I'd like for it to show that 3rd...
  3. A

    Problems with Array (probably syntax)

    Well after you showed me the correct single line declaration, I kinda had an aha moment as I had seen it done that way before. That's one of those mistakes you remember forever and are just constantly conscious of it. Funny you mention it, PHP is next on my to do list. I have the MySQL/PHP...
  4. A

    Problems with Array (probably syntax)

    Dim douProductionRate, douDefaultRate as Double D'oh!!!!
  5. A

    Problems with Array (probably syntax)

    Ohhh! I wonder how much other stuff I'm calling as a variant, lol! Furthermore, I bet that was the problem with my initial array. Thanks again for your help too. I actually like your method better, it's way cleaner. I'm still too novice to quite understand the efficiency of variables, but...
  6. A

    Problems with Array (probably syntax)

    I got it!!! Fairly bizzarre, but I took Dim udtPayRates, udtProposedPayRates As tpeDubDub and changed it to Dim udtPayRates As tpeDubDub Dim udtProposedPayRates As tpeDubDub and voila!
  7. A

    Problems with Array (probably syntax)

    No, but I did find another problem with it. I replaced: DetermineHourlyProduction = PayRateswith GetHourlyProduction = PayRatesBut still getting the "Compile Error: Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions."...
  8. A

    Problems with Array (probably syntax)

    D'oh! It works.
  9. A

    Problems with Array (probably syntax)

    Well....here's what I did: Public Type MyCustomType Field1 As Double Field2 As Double End Type Public Function GetIt() As MyCustomType Dim something As MyCustomType something.Field1 = 1 something.Field2 = 2 End Function Public Sub doit() Dim this As MyCustomType this = GetIt MsgBox...
  10. A

    Problems with Array (probably syntax)

    Yes, I actually realized after the fact that GetHourlyProduction function was still variant. I changed it to tpeDubDub but no dice. Maybe I have my functions in the wrong place. I have GetHourlyProduction in a standard mod, the udt in a different standard mod, and ReconcileTimesheet in the...
  11. A

    Problems with Array (probably syntax)

    So I decided to go with the UDT but I'm having probs there too. I get the error "Compile Error: Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions." All while highlighting 'PayRates' So I took it out of the new module...
  12. A

    Problems with Array (probably syntax)

    OK, I got 8197 inside the array functionfor ?vartype(PayRates), but then in the calling function, for ?vartype(myvar) it returns 5 meaning double (which is what the individual parts of the array are dimmed in the array function). Then if i do just ?myvar it returns 0. If I do a ?myvar(0) it...
  13. A

    Problems with Array (probably syntax)

    Also tried this in the calling function: Dim PayRates(0 To 1) It jumps to this line: PayRates = GetHourlyProduction(rsLiveData!CompleteDate, rsLiveData!ProductionInputDetailID, rsLiveData!ContractorID) and highlights payrates and errors saying 'Can't assign to array.'
  14. A

    Problems with Array (probably syntax)

    Adding the parenthesis didn't do the trick. When i do ?VarType(PayRates), it returns 0 but i don't know what that means. For that UDT idea...does that mean that I need to make a new UDT everytime I want to pass multiple variables? If you needed to pass multiple variables via say openargs...
  15. A

    Problems with Array (probably syntax)

    I also tried a ?payrates(0) in the immediate window and I'm still having the problem.
  16. A

    Problems with Array (probably syntax)

    Hey guys- I'm pretty new to using arrays and I find them quite helpful, but this one has me really stumped. When I run 'MyVar = PayRates(0)' in the calling code, I get a 'Type Mismatch' error. This is the abridged version of the calling code Function ReconcileTimesheet(ProductionID As Long)...
  17. A

    .EOF takes a really long time!

    1) Yes, we have some hanging on a '.movenext', maybe it doesn't 'open' per se until a command is thrown. Interesting..... 2) Nope... Not that good yet ;) Glad we have some kind of closure on that EOF thing though.
  18. A

    .EOF takes a really long time!

    That's what is bothering me too, how could an EOF cause this much drama? But I would put a crater in my desk about the size of my forehead if my problem boiled down to indexing again. On a quick side note, that access database is screamin now that I fixed the indexes there. So now to the...
  19. A

    .EOF takes a really long time!

    Sure does....it is still lagging though :(
  20. A

    .EOF takes a really long time!

    I did take that out...or am I way off here: SELECT hscount.mapname, hscount.mslink, hscount.act_count, poleped.cell_name FROM Address, hscount, poleped WHERE poleped.mslink= hscount.pole_link and hscount.mapname = '471-480' HAVING poleped.cell_name<> 'PLENUL' Atomic Shrimp- I'm not looking...
Back
Top Bottom