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 gkittelson 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. Weltman

    Error #3027 Can't Update Records of Dynaset

    woyler: Actually, I first started programming in VB when there first was such a thing, but I'm a few years out-of-date and still using the books for VB4. The reason I named the database "MyFirstDB" was because there will be more than one database used with this application. Anyway...
  2. Weltman

    Error #3027 Can't Update Records of Dynaset

    In case anybody is interested, the answer is: Include the option "dbInconsistent" in OpenRecordset, on line# 50. 50 Set FilteredSet = MyFirstDB.OpenRecordset(SQL, dbOpenDynaset, dbInconsistent) Weltman
  3. Weltman

    Error #3027 Can't Update Records of Dynaset

    Each of the fields in the tables of my database are updatable, but when I create a recordset using the following code, the fields are not updatable. I get Error #3027, Can't update...Object is read only on line #80. Can anybody tell me why, and what I can do about it. Public Sub DeleteCat() On...
  4. Weltman

    Error #3061 When Using OpenRecordset Method.

    BeerFreak, Thanks. The query works now, with syntax errors removed. Also, OpenRecordset likes it. Although, I don't thoroughly understand it, here is the final statement: 60 CatQuery = "SELECT * FROM Names " & " WHERE BallotNumber = '" & VarBallotNumber & "' AND...
  5. Weltman

    Error #3061 When Using OpenRecordset Method.

    I have a sub beginning with the following code: Public Sub PreviousCat() On Error GoTo EditCatError Dim I As Integer Dim MyDB As Database, MyRs As Recordset, FilteredSet As Recordset, CatQuery As String 10 Set MyDB = DBEngine.Workspaces(0).OpenDatabase("C:\Program Files\Microsoft Visual...
  6. Weltman

    Adjusting substring length in label captions.

    JohnYingling, That's Wonderful! It Works Just fine. Thank you very much. Weltman
  7. Weltman

    Adjusting substring length in label captions.

    JohnYingling, There's a possibility that I don't fully understand your suggestion, but let me try to further clarify what I'm trying to do. I have an array of labels. Other than the first (index 0), the labels are created at run time. Just to the right of each label is an option button. The...
  8. Weltman

    Adjusting substring length in label captions.

    I have an array of labels whose captions list candidates on a ballot. I want to make the captions of equal length regardless of some variations in the length of the candidates' names. Right now, I have the following code: Number = 32 - (Len(CandidateName) + Len(Affiliation))...
  9. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    Mark, If You're talking about a sub in Visual Basic then the sub has to end with "End Sub". If you have the line of code "On Error Resume Next" after "End Sub" then just delete the line and recompile you program. Weltman
  10. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    Another Update. For anybody who might be interested, this time I solved the problem by putting the instruction to set focus to the textbox back into the GotFocus Event Procedure, but this time I made it conditional as follows: If TooMany = False Then NameBox6(Index).SetFocus This eliminated...
  11. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    Update: Moving the line of code (See Line 50 below)from the GotFocus Event Procedure to the Click Event Procedure solved the problem. Private Sub Check5_Click(Index As Integer) On Error GoTo ErrorHandler 'Countem to make sure there's no overvote. 10 CountChecks(5) = 0 20 MaxVotes = 2 30 Call...
  12. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    AudioPlayer65, My understanding is that the MsgBox is automatically modal, since the button value for modal is 0. Incidentally, I am still having problems with this whole thing, but it's a long story, and I'll post it as soon as I have time to summarize it. Thanks for your response. Weltman
  13. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    I found the problem, thanks to you guys! It was in the GotFocus Event Procedure, and as Chip suspected, was caused by "SetFocus." At the bottom of the procedure (NameBox5(3).SetFocus: Private Sub Check5_GotFocus(Index As Integer) Frame1(5).BackColor = &HE0E0E0 'Highlight Frame For...
  14. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    Jeff, I tried running the program with your numbered lines of code and the error handler. I do not get the message from the error handler at all. I only get the run time error message, and when I click OK I get the message that I was trying to display in the event of an overvote. But, here's...
  15. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    Yes they are visible, and as I said, This all works fine until after I compile it. Weltman
  16. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    Thanks for your advice so far. I'm not even sure I'm doing this posting correctly, but here's the code: Private Sub CountemUp5(Index As Integer, MaxVotes As Integer) For IndexNumber = 0 To 3 If Check5(IndexNumber).Value Then CountChecks(5) = CountChecks(5) + 1 End If If CountChecks(5)...
  17. Weltman

    Run Time Error 5 in Compiled Version VB 6.0

    I get a run time error 5 (Invalid Procedure or Argument) in the compiled version of my program only, when trying to use the MsgBox Function to display a message in a Click Event Procedure. Here's the Procedure: Private Sub Check5_Click(Index As Integer) On Error Resume Next 'Countem to make...

Part and Inventory Search

Back
Top