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. BLSguy

    Help streamline my code?

    Andrzejek, excellent points for me to learn from, thank you! Changes applied :) Now to input a boat load of data, and my program is ready to go! I intend to make a few more databases to handle our other classes and administrative tasks. By the time I'm done, I might even be able to contribute...
  2. BLSguy

    Help streamline my code?

    Hey, I figured out something that works! Check out this code: Private Sub lstClasses_DblClick(Cancel As Integer) If Me.lstClasses.Column(4) = Me.lstClasses.Column(5) Then MsgBox ("Class is full!") Exit Sub End If Dim ClassID As Long If Not IsNull(Me.lstClasses.Value) Then ClassID =...
  3. BLSguy

    Help streamline my code?

    dhookom, I completely forgot that the first column is 0! Thank you! I'll try it again! It works!! However, how do I get it to stop the advancement to the next form after the "Class is full" popup? MajP, yes, I did away with the registration table because it was giving me some headaches with...
  4. BLSguy

    Help streamline my code?

    I appreciate your patience as you all bear with me as I learn this software. Here is the SQL for qryAllClasses: SELECT tblClasses.ClassID, tblClasses.Class_Date, tblClasses.Class_Time, tblClasses.Type, Count(tblStudents.ClassID) AS CountOfClassID, tblClasses.Capacity FROM tblClasses LEFT JOIN...
  5. BLSguy

    Help streamline my code?

    Thank you MajP. I managed to navigate to the SQL view, but the proper code is still eluding me as of yet.
  6. BLSguy

    Help streamline my code?

    I'm not having much luck with the SQL either. Capacity: IIf([tblStudents]![ClassID] < [Capacity], "Open", "Full") Tried a VBA variant and no luck there. I'm sure the solution to this is simple, it's just complicated to me.
  7. BLSguy

    Help streamline my code?

    Row source of lstClasses is qryAllClasses in qryAllClasses, there are 6 columns. Column 5 is the count of students in each class, column 6 is the maximum numbers of students allowed in that class.
  8. BLSguy

    Help streamline my code?

    Thank you MajP, I was wondering how to highlight code the way you all do. Dhookom, I tried adding the break point as you suggested. It highlighted in yellow the line: If me.lstClasses.Column(5) = me.lstClasses.Column(6) Then Private Sub lstClasses_DblClick(Cancel As Integer) If...
  9. BLSguy

    Help streamline my code?

    Of course I'm sure I'm doing something wrong, but I couldn't get that code to work. Private Sub lstClasses_DblClick(Cancel As Integer) If me.lstClasses.Column(5) = me.lstClasses.Column(6) Then MsgBox ("Class if full!") End If Dim ClassID As Long If Not IsNull(Me.lstClasses.Value) Then...
  10. BLSguy

    Help streamline my code?

    My database is just about ready to deploy! One last dilemma, however... This code works great: Private Sub ListBoxName_DblClick(Cancel As Integer) Dim classID as long If not isnull(me.listboxName.value) then classID = me.listboxName.value docmd.openform “YourSecondFormName”...
  11. BLSguy

    Help streamline my code?

    Fantastic! That did the trick! For the sake of having the database ready in time, I'm foregoing buttons in favor of one big list.
  12. BLSguy

    Help streamline my code?

    I've been struggling to grasp the nature of declaring and using variables and have had little success in my attempts to use them. I used the first block of code you posted: Code--> 1.Private Sub lstClasses_DblClick(Cancel As Integer) 2. Dim classID As Long 3. If Not...
  13. BLSguy

    Help streamline my code?

    I've tried many of the excellent suggestions here, but for my lack of experience have been unable to get them to work as I need. I have a rapidly approaching deadline to get this database operational so I've had to revert to some less than ideal structuring in favor of functionality. I entered...
  14. BLSguy

    Help streamline my code?

    Andrzejek, I give stars because I figure it's the least I can do to show my appreciation :D With the way I've got this database laid out, and the relatively simple tasks it needs to accomplish, once I have it all working it should require minimal maintenance. I won't be adding to it once it's...
  15. BLSguy

    Query or Macro for this function on a form?

    So I've made all the changes suggested thus far and cleaned up tables, names, etc. The current issue I'm working on is trying to restore the functionality of my application but using the improved techniques suggested here. So here's my current database: And here's frmReg: I need the combo...
  16. BLSguy

    Help streamline my code?

    Andrzejek, sorry I didn't give you credit earlier! I went back and starred your posts. I'm still not sure how to transfer the portions of the date I'm after into a combo box or list box, but I know your advice was a big step in the right direction. I also made the changes to my tables and...
  17. BLSguy

    Help streamline my code?

    MajP, thanks again for your valuable insight! I will make those changes immediately to the best of my ability. I'm sure your method would expedite the process of inputting new classes down the road.
  18. BLSguy

    Controls to update Queries on a Form?

    Those were all excellent ideas, and I think I know enough to actually employ two of them. However, for purely aesthetic purposes, is there a way I could set each of 12 button controls to requery but with the where condition or the filter set to a month dictated by each individual button? Thank...
  19. BLSguy

    Help streamline my code?

    MajP, thank you for the link. I've found similar information from a variety of sources but I'm struggling to understand how to apply it to the contents of my list box using your tag method. Andrzejek, I completely agree, and that's why I knew you all would be able to help! MajP, on...
  20. BLSguy

    Help streamline my code?

    Thank you! This is going to make updates MUCH easier! I copied in the code and followed your steps. Now I just need to learn how to do the filtering part!

Part and Inventory Search

Back
Top