Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Joe Crescenzi

    Data type mismatch

    That one sentence explains it perfectly. There is no other cause possible. The table has a type. The textbox does not have a type until you either set an initial value in the designer, or programatically via Textbox.value = (something) before the form becomes active, where whatever you put...
  2. Joe Crescenzi

    Poll #4: What (proposed) successors of FoxPro have you tried, plan to use/learn about?

    I love the concept of FoxInCloud, but I've always worried about the logistics of where and how to host it, and that it essentially runs on top of the same FoxPro runtimes, which I love and hate the idea of. I did some fun experiments by installing just the FoxPro OLE drivers, then creating a...
  3. Joe Crescenzi

    FoxPro button status

    That's exactly right. Believe it or not, I still have some legacy code that uses @ SAY / GETs in sections and the approach I used there was to clear the screen, create an endless loop with DO WHILE .T. that paints the screen with all sorts of conditional variations and continues to loop after...
  4. Joe Crescenzi

    FoxPro button status

    I didn't notice the version. Since 2.6 lacks properties, methods, and events, you will only be abled to do what you're asking if you create your own environment where you track the status in a variable, then generate the screens on the fly in some sort of loop. For example, if you paint the...
  5. Joe Crescenzi

    Poll #4: What (proposed) successors of FoxPro have you tried, plan to use/learn about?

    Microsoft has frustrated me for decades as they keep pushing developers to entirely different paradigms, then drop support a few years later. I jumped on COM and .ASP as soon as it came out, only to abandon boatloads of code when ASP.NET / ASPX replaced it. Then I focused on ASPX with VB. I...
  6. Joe Crescenzi

    Poll #4: What (proposed) successors of FoxPro have you tried, plan to use/learn about?

    I think VFPA is using newer C++ Runtimes too, and it's basically identical to the last official release, with some bug fixes. The developer also got rid of the 2GB file limit, but that's not a concern for me. I still won't use it in production, if at some point Microsoft discontinues support...
  7. Joe Crescenzi

    Data type mismatch

    Two things: 1. To know for sure what is going on there... put this in front of the line that is failing: MESSAGEBOX("thisform.iznos2.value is type: " +VARTYPE(thisform.iznos2.value)) I created this to illustrate what it will look like when I don't assign a value before using it... it's C...
  8. Joe Crescenzi

    Data type mismatch

    When debugging complex forms with lots of controls and fields, one approach is to isolate just one control that doesn't seem to work onto a test form so you eliminate any chain reactions that come from the complex forms with a lot of controls. It's when you have a simple form with a single...
  9. Joe Crescenzi

    FoxPro button status

    I'm sorry, I was trying to simplify by using essentially Pseudo code, since I don't know the name of your button, or where it is. If the button is on the top of a form, it would read: If Thisform.MyButton.Enabled If it's someplace inside another control such as a container or in a page within...
  10. Joe Crescenzi

    FoxPro button status

    PS... In my response, I was assuming the OP was not intending to put code like this in the same button that is being clicked, otherwise there would be no need to check the status of the button, and it definitely couldn't be reversed by clicking the same button. For what it's worth, I like using...
  11. Joe Crescenzi

    FoxPro button status

    I agree. I just wanted the easiest way to illustrate reading the value and setting the value, so I opted for simple independent IF and = lines to make it easy to read.
  12. Joe Crescenzi

    User defined property in Property-window

    Oddly enough I just answered a very similar question just moments ago and the code is identical. To toggle a logical property you can do this. IF MyButton.Enabled MyButton.Enabled = .F. ELSE MyButton.Enabled = .T. ENDIF To toggle use alignment values from 0 to 3, you can do something...
  13. Joe Crescenzi

    FoxPro button status

    Like many other FoxPro Properties, Enabled can be used to Set and Get values. So you can do things like this... IF MyButton.Enabled MyButton.Enabled = .F. ELSE MyButton.Enabled = .T. ENDIF
  14. Joe Crescenzi

    Data type mismatch

    I've always found it odd that there's any flexibility at all. (3,1) should mean that the decimal is always in the middle, making 9.9 the highest value. The fact that it can also represent a max of 999 in cases where you push over a big number and it decides to move or remove the decimal is...
  15. Joe Crescenzi

    Poll #2: What versions of FoxPro/XBase languages do you currently use/support?

    I wish there were genuinely newer options, not just bug fixes like VFPA. Ideally, I'd love something that lets us deploy Windows, MacOS, iOS, iPadOS, Linux, and Android Apps with the same codebase, with the only real changes being some #IF segments where needed to designate what parts to...
  16. Joe Crescenzi

    Data type mismatch

    Here's the result, where every value is still no more than 3 characters.
  17. Joe Crescenzi

    Data type mismatch

    Oops.. You are correct. 1.99 is 4 characters. N(3,2) gives you a max value of .99 N(4,2) gives you a max value of 9.99 N(5,2) gives you a max value of 99.99 N(6,2) gives you a max value of 999.99, which, as I mentioned earlier is what the OP needs.
  18. Joe Crescenzi

    Poll #5: What other programming languages did you use, do you use, or are planning to use/learn?

    I've been writing code since 1979, and since I'm self-employed I try not to learn languages just because they're trending as an opportunity for future jobs. I've always felt that the language and its syntax are just a small part of the equation. The analogy I've often used is that if you were...
  19. Joe Crescenzi

    Poll #1: What versions of FoxPro/XBase languages did you use?

    When sharing files on a File Server that's based on newer versions of SMB have a feature called Optimistic Locking (aka OpLocks) that improves speed of accessing files, by trusting local cached versions of files rather than forcing the local client to re-read them, which often conflicts with the...
  20. Joe Crescenzi

    Data type mismatch

    Just to be clear, FoxPro numeric types are based on the character length, including the decimal itself, so 999.99 is actually N(6,2), because that is 6 characters. N(3,2) will only hold 1 number before the decimal, then the decimal, then the 2 numbers after the decimal. (Example 1.99).

Part and Inventory Search

Back
Top