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...
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 =...
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...
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...
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.
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.
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...
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...
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”...
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...
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...
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...
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...
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...
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.
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...
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...
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.