Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
This is not valid:
ElseIf Me.cboClassName "" Then
It probably should be:
ElseIf Me.cboClassName = "" Then
But I'm guessing that's just a result of posting the code here? Anyway, assuming the code is OK on your end (because it's not erroring for you, right?), it looks like the actual problem is in one of the two queries this code can run--qryStudentPayEmailClass or qryStudentPayEmail.
Probably the error was from posting-
I will look at the queries- I usually understand those!
Ok- I just deleted my name! I thought I was emailing!
So, the way this was set up, there is a form with 2 drop down menus, one for students and one for classes.
There are 2 queries, one for students, which returns the student information from the all the classes from the one student chosen student drop down box and one for classes, which returns all student information for the class chosen in the drop down box.
All that is in the query currently is either [Input Student ID] or [Input class ID].
I think the ideal think would be to return the class most recently entered, but a) I don't know how and b) I don't know if that field exists, although I can add it.
OK, I think this is what you need:
Say you have a table called tbltest, with a unique ID of ID, a field 'stuff' and a dateadded field. You could try this:
SELECT tbltest.ID, tbltest.stuff, tbltest.dateadded
FROM tbltest
where tbltest.dateadded = (select max(dateadded) from tbltest)
However, if you have more than one record with the same maximum date, it will return all the records with that maximum date.
Is this what you need?
I think so! Someday I will learn this stuff. We have a database designer, but I have been asking for this modification for over 3 years, and we are a really low priority.
Heh - I am Zen. I saw the start of a post and went, "Hey, I know Access!" but inside of two lines...blah blah Ginger...
The blah blah Ginger is sort of why I asked the question!
I do love that the "blah blah Ginger" is such a useful quote.
Is facebook not loading right for anyone else?
Thouht for the day: if you're having a problem with anything - a program, application, etc. - and the person who knows about it says "oh, you just ..." you're in trouble.