Riley: Maybe I should just let you rest. Buffy: You sure? I bet if you just lay down with me- Riley: Nothing you are about to say will lead to rest.

'Lessons'


Buffistechnology 3: "Press Some Buttons, See What Happens."

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!


Sophia Brooks - Jan 31, 2007 11:48:42 am PST #505 of 25496
Cats to become a rabbit should gather immediately now here

OK- SQL view

SELECT Classes.ClassName, Classes.DepartmentID, Classes.InstructorID, Classes.NSGNumber, Classes.CRN, Classes.Units, Classes.Year, Classes.Location, Classes.DaysAndTimes, Classes.StartDate, Classes.EndDate, Classes.TermCode, Classes.Price, Classes.Notes, Students.FirstName, Students.MiddleName, Students.LastName, [Students And Classes].StudentClassID, [Students And Classes].ClassID AS [Students And Classes_ClassID], [Students And Classes].StudentID, [Students And Classes].PayAmount, [Students And Classes].PayType, [Students And Classes].PayCCNum, [Students And Classes].PayCCType, [Students And Classes].PayCCExp, [Students And Classes].PayCCName, [Students And Classes].PayCCAuthCode, [Students And Classes].PayDate, [Students And Classes].PayCKNum, [Students And Classes].PayNum, [Students And Classes].DepositDate, [Students And Classes].PaymentNote, Classes.ClassID FROM Students INNER JOIN (Classes INNER JOIN [Students And Classes] ON Classes.ClassID = [Students And Classes].ClassID) ON Students.StudentID = [Students And Classes].StudentID WHERE (((Classes.ClassName)=[Forms]![frmClassPayqry]![Class Name] Or (Classes.ClassName)=[Forms]![frmClassPayqry]![Class Name]) AND ((Classes.NSGNumber)=[Forms]![frmClassPayqry]![NSG Number] Or (Classes.NSGNumber)=[Forms]![frmClassPayqry]![NSG Number]) AND ((Classes.CRN)=[Forms]![frmClassPayqry]![CRN] Or (Classes.CRN)=[Forms]![frmClassPayqry]![CRN]) AND ((Classes.Year)=[Forms]![frmClassPayqry]![Year] Or (Classes.Year)=[Forms]![frmClassPayqry]![Year]) AND ((Classes.StartDate)=[Forms]![frmClassPayqry]![Start Date] Or (Classes.StartDate)=[Forms]![frmClassPayqry]![Start Date} Is Null]) AND ((Classes.TermCode)=[Forms]![frmClassPayqry]![Term Code] Or [Forms]![frmClassPayqry]![Term Code] Is Null) AND ((Classes.ClassID)=[Forms]![frmClassPayqry]![Class ID] Or [Forms]![frmClassPayqry]![Class ID] Is Null));


tommyrot - Jan 31, 2007 12:10:06 pm PST #506 of 25496
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Ooh, this is a fun one!

Every so often the graphical query by example thingie screws up and adds extra 'OR' lines. Your SQL looks OK, btw....

Here's what I would try: Take the query you have now, get rid of all the criteria and save it with some different name. Then create a new query based on the query you just saved and put all your criteria on that. (The "inner query" will appear as a table in the "outer query") See if this new query works.

If not, I'd next take the "inner query" and get rid of all the spaces in field names (replace them with an underscore or something). i.e. the aliases would have names without spaces but the original field names could stay the same.

Anyway, try that for now. If it still doesn't work there are a few other tricks we could try....


Sophia Brooks - Jan 31, 2007 12:15:33 pm PST #507 of 25496
Cats to become a rabbit should gather immediately now here

Thanks tommyrot! I am about to call it quits for the day and go teach some sewing. I will try this tomorrow. I am really excited about learning Access, but I can't bother our IT people here too much or our department will have to pay for their time, so after about 4 hours with our database designer and watching her do things, I am muddling through myself for the time being. All I can say is that this is not as intuitive as filemaker, but I think I am getting it a little bit. I just wish I had a working database that I could pick apart to see how things were done.


tommyrot - Jan 31, 2007 12:21:53 pm PST #508 of 25496
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

What version of Access are you using?


Sophia Brooks - Jan 31, 2007 12:24:29 pm PST #509 of 25496
Cats to become a rabbit should gather immediately now here

2003, for PC. All of my experience is in Filmaker Pro 7 for Mac


tommyrot - Jan 31, 2007 12:24:38 pm PST #510 of 25496
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

I've reproduced the problem here. MS's how-to criteria

Forms!FormName!ControlName Or Forms!FormName!ControlName Is Null

just doesn't seem to be liked at all by the GQBE grid.


Sophia Brooks - Jan 31, 2007 12:28:26 pm PST #511 of 25496
Cats to become a rabbit should gather immediately now here

So MS is telling me the wrong way to do something in their own product, or I was looking at the wrong instructions (I looked about 30 times to make sure I was looking at the right version instructions? (I don't know what the GQBE grid is?)


tommyrot - Jan 31, 2007 12:30:13 pm PST #512 of 25496
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

I don't know what crack they're smoking. Their technique seems strange to me. Anyway, I got it to work a different way. (Work as in the GQBE grid doesn't screw it up. Haven't tested with actual data.)

gimme a few minutes to write it up....


Sophia Brooks - Jan 31, 2007 12:33:37 pm PST #513 of 25496
Cats to become a rabbit should gather immediately now here

Sophia Brooks - Jan 31, 2007 12:34:17 pm PST #514 of 25496
Cats to become a rabbit should gather immediately now here

Thanks in advance tommyrot-- I am really going now or I am going to be late for class, but I will take a look later. Again, thanks for your time.