Search:

Type: Posts; User: Doogle

Page 1 of 13 1 2 3 4

Search: Search took 0.13 seconds.

  1. Re: Add code to existing: Populate combobox from database

    Are you attempting to add the item selected from the ListView into the ComboBox, or is it there already and you want to select it ?
    This little Function will search the Combo for a given item and if...
  2. Re: syntax error missing in query expression

    In your picture in Post #38 where did you get the & ")" from at the end of the Where clause?
    try this:


    CN.Execute ("UPDATE Expenses SET " & _
    "ExpDate= #" &...
  3. Re: syntax error missing in query expression

    I can't believe there's been 30 replies ................and it's not resolved.

    At the risk of repeating what's already been said. The first character in txt(3).text is a Currency symbol. When...
  4. Re: syntax error missing in query expression

    I'd take a look at the completed SQL and see if it's anything obvious


    Dim strSQL As String
    strSQL = ("UPDATE Expenses SET " & _
    "ExpDate= #" & MyDate(PickDate.Value) & "#, " &...
  5. Re: Strange Serial Behavior When Changing Text Box Value

    This may be a silly question, but how do you know that the microcontroller has not changed configuration? You don't seem to interrogate it after changing.

    Perhaps you may see what's going on if...
  6. Replies
    8
    Views
    159

    Re: Problem in update database

    The code posted will not run - there's an 'End IF' missing - which could be seen easily if you'd indented your code.


    Private Sub colocarregisto()
    Set db = Workspaces(0).OpenDatabase(caminho)...
  7. Re: Image List must be initialized before it can be used.

    Just to expand on my earlier thought. The 4th argument of the .Add method for a ListView Listitem is the Icon. OP has specified "mm/dd/yy" which led me to believe that they were really trying to...
  8. Replies
    1
    Views
    73

    Re: How to Crreate a Connection to DB2

    There's some info regarding using ADO and DB2: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/t0007411.htm
  9. Replies
    13
    Views
    253

    Re: help extract this string

    I don't know, some Web pages get very large in terms of number of characters, especially those with embedded Java and the like. The home page of these forums is about 8,500 words and at an average of...
  10. Re: Image List must be initialized before it can be used.

    I suspect you need


    Set lvwItem = ListView1.ListItems.Add(, , Format(oRS.Fields.Item("Date_Entered").Value, "mm/dd/yyy"))
  11. Re: Trial and error process to find a variable that its function value is known

    I probably shouldn't but I'm going to rise to the bait.....



    Just out of interest, how does quoting some generalised 'C' code and re-naming the problem as 'binary search', help ?

    OP's...
  12. Re: question: how to capture the screen area

    A search here would have turned up this: http://www.vbforums.com/showthread.php?552410-VB6-Another-Screen-Capture it seems to be very flexible.
  13. Thread: For Loop issues

    by Doogle
    Replies
    15
    Views
    308

    Re: For Loop issues

    BTW you should use code tags to enclose your code here. It retains the original formatting and is much easier to read i.e.



    Your code goes here


    You should be able to edit your previous...
  14. Thread: For Loop issues

    by Doogle
    Replies
    15
    Views
    308

    Re: For Loop issues

    The reason you're seeing the compile errors is because you're not defining your variables and they are all defaulting to Variants.

    Case in point, Function SP expects two arguments; since you...
  15. Thread: For Loop issues

    by Doogle
    Replies
    15
    Views
    308

    Re: For Loop issues

    If you need X to vary then you could establish an outer loop


    For sngX = <some starting value> To <some ending value> Step <some increment>
    For lngT = 1 To CellDim
    For lngS = 1 To...
  16. Re: Trial and error process to find a variable that its function value is known

    Again, talking off the top of my head and with total ignorance, the fact the h3 and h_dis don't converge is because the T1 -> T2 Range is too small or is of the wrong magnitude, perhaps widening the...
  17. Re: Multiple viewing of Matching Data frp, a Textfile.

    I suspect you should set all the labels' Caption properties to vbNullString as you do with lblscore


    frmviewscore.lblscore.Caption = vbNullString
    frmviewscore.lblstarsearned.Caption =...
  18. Re: Trial and error process to find a variable that its function value is known

    I'm afraid I don't understand the Science so I'm not going to be much help there. I think you're going to have to look at the sequence of calculations.

    On second thoughts, perhaps you should be...
  19. Re: Trial and error process to find a variable that its function value is known

    Using '2605' in the first TextBox I used a 'Debug.Print Abs(h3 - h_dis)' statement in Subroutine Tdiscalcs in the 'Do While Abs(h3 - h_dis) > 1' loop and it is constantly showing as 67.53052, so...
  20. Replies
    10
    Views
    191

    Re: help of visual basic form

    That's nifty, Bonnie. As everything I write is for me, I think I might start doing that as well.
  21. Re: Trial and error process to find a variable that its function value is known

    There are two issues I can see



    Private Sub OK_Click()

    Call Tdiscalcs
    h_dis = Val(Text1.Text)
  22. Re: how to calculate between times (login & logout)

    My guess is that rs![logtotal] is not Null, perhaps there are spaces in it ?. Set a breakpoint on the 'If IsNull(RS![LogTotal]) Then' statement and hover the mouse over LogTotal and see what the...
  23. Re: Multiple viewing of Matching Data frp, a Textfile.

    Accessing Forms 'frmoptions' and 'frmshop' will cause the Forms to be loaded and the Enables / Disables will be performed. If you subsequently Load the Forms then new copis will be loaded and the...
  24. Re: Trial and error process to find a variable that its function value is known

    It appears that a Module is missing from your attachment.
  25. Re: Multiple viewing of Matching Data frp, a Textfile.

    You should be inputting from intfile not intfile2

    EDIT: BTW should '< 20' be '< 5' in the If statement ?
  26. Re: how to calculate between times (login & logout)

    I don't think I really understand the problem, but if you want to calculate the difference between the two items it's a simple matter of checking if a Logout time exists, if it does, check if the...
  27. Replies
    32
    Views
    466

    Re: code error 09 in vb 6 accounting system

    It's just a simple matter of entering a Supplier in the textbox and pressing the enter key, that will perform the search and if found the supplier will be displayed in the ListView.
  28. Re: Multiple viewing of Matching Data frp, a Textfile.

    You're going to have to check that the usernames match then I think a simple If Then construct should be ok


    Input #intfile2, usern, doublestars, star5, theme1, theme2, theme3, theme4
    If usern =...
  29. Replies
    32
    Views
    466

    Re: code error 09 in vb 6 accounting system

    The problem with the cmdOK_Click code is that the ListView is empty and therefore no item has been selected. I suspect you've got to populate the ListView then select the item you want to search for...
  30. Replies
    13
    Views
    253

    Re: help extract this string

    @Doc: By default literal numbers in VB are of type Integer, suffixing a literal with a '&' forces it to be of type Long. Bonnie's code is avoiding an implied CLng when the code is executed.
  31. Thread: listview

    by Doogle
    Replies
    1
    Views
    99

    Re: listview

    To add to an exiting flat file you have to open it for Append.


    Dim intFile As Integer
    intFile = FreeFile()
    Open "C:\MyDir\MyFile.txt" For Append As intFile
    Print #intFile, strUser; "," ;...
  32. Replies
    32
    Views
    466

    Re: code error 09 in vb 6 accounting system

    I take it that you're not the Author of all this code.

    The cmdSave_Click event has been written to either Insert a new Supplier or Update an existing Supplier. Which operation it performs depends...
  33. Replies
    32
    Views
    466

    Re: code error 09 in vb 6 accounting system

    I really don't know how many more times I'm going to have to say this, but look at the code for cmdSave in frmMMSSupplier


    Private Sub cmdsave_Click()
    Select Case cmdSave.Caption
    Case...
  34. Replies
    32
    Views
    466

    Re: code error 09 in vb 6 accounting system

    I can't open .rar files. What's wrong with .zip?
  35. Re: Multiple viewing of Matching Data frp, a Textfile.

    I would say that's exactly what the problem is. If you reference that Form before setting up any of the labels etc. then it will write the sort of line you're seeing.
  36. Thread: For Loop issues

    by Doogle
    Replies
    15
    Views
    308

    Re: For Loop issues

    On re-reading your first post, whilst not understanding the Science involved, I think you are attempting to return a value which is a Function of X, Rc and Rn for given values of S and T. Perhaps,...
  37. Thread: For Loop issues

    by Doogle
    Replies
    15
    Views
    308

    Re: For Loop issues

    Not sure that


    If 0 <= x <= 2 * Rn Then

    is doing what you think it is. I can't see how it's being evaluated but it seems to always return True irrespective of the values of x and Rn.

    I...
  38. Replies
    35
    Views
    591

    Re: [RESOLVED] App Crashes Only If Shelled

    @dilettante: Have you ever thought of setting up a Web Page with all your 'pearls of Wisdom'? It'd save me hours searching these Forums for gems of knowledge (perhaps 'dilettane-pidea') :)
  39. Replies
    43
    Views
    664

    Re: Help with GoTo statements and looping

    No, it's not a VB Control, it's a Property of the Session Object which in turn is specific to the Application OP is using.
  40. Replies
    43
    Views
    664

    Re: Help with GoTo statements and looping

    Have you tried removing the 'StatusBar = ""' statements ?
    should


    If .StatusBar = "" Then

    be


    If .StatusBar <> "" Then
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4