Book: Afraid I might be needing a preacher. Mal: That's good. You lie there and be ironical.

'Safe'


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!


tommyrot - Jan 31, 2007 10:09:25 am PST #496 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.

When I tab away from that field in the query in design vier, there are extra brackets added around the word form that I did not put is there.

The query designer will do that, but that's fine.


Sophia Brooks - Jan 31, 2007 10:17:47 am PST #497 of 25496
Cats to become a rabbit should gather immediately now here

Thanks Tommy. I have been trying to fix this for hours, so I feel a little DUM!


Sophia Brooks - Jan 31, 2007 10:38:19 am PST #498 of 25496
Cats to become a rabbit should gather immediately now here

OK-

So when I enter the data I am searching for on the form, a) I am coming up with an empty qury no matter what I type, and b) when I open up the query in design view to check it, I have the [Forms]![frmClassPayqry]![NSG Number] Or [Forms]![frmClassPayqry]![NSG Number] under Criteria about 10 times per field, instead of the one I types, and It has added [Forms]![frmClassPayqry]![NSG Number] as a "field" in the columns to the right, with a whole bunch of "Is Nulls" in the bottom.

Any ideas?


tommyrot - Jan 31, 2007 10:54:37 am PST #499 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.

Hmm... not sure what it's doing.

When you enter the criteria in the criteria field, are you putting it all in one field? and not two (because of the OR)?

(You know how in the query design form, there's multiple lines for criteria - using more than one line results in the query interpreting the two lines as being used together with an OR. But that's not what you want to do in this case - you should just be using the first line of the criteria fields. For example, one field would have this:

[Forms]![frmClassPayqry]![Year] Or [Forms]![frmClassPayqry]![Year] Is Null

in the criteria field on a single line.)

Does that make sense?


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

Yes, I am putting them on a single line. It looks all perfect until I try the search and it adds all this stuff!


tommyrot - Jan 31, 2007 11:12:24 am PST #501 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.

If you just save and close the query and then reopen it in design view, is it still all screwed up?


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

No-- But I THINK (I am still deleting all the crap to check) that when I go into non-design view on the query it does add all the crap. And it does a Parameter Search. Also, I am actually doing this with 4 fields and the same thing is happening in each field.


tommyrot - Jan 31, 2007 11:31:10 am PST #503 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.

Once you get everything in the query fixed the way it should be, can you switch to SQL view, copy the SQL and send it to me? or post it here?


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

It is also truncating some of what I typed in- so in addition to repeating it 15 times, the [Forms]![frmClassPayqry]![NSG Number] Or [Forms]![frmClassPayqry]![NSG Number] Is Null becomes [Forms]![frmClassPayqry]![NSG Number] Or [Forms]![frmClassPayqry]![NSG Number] without the Is Null.

And in another field [Forms]![frmClassPayqry]![Start Date] Or [Forms]![frmClassPayqry]![Start Date] Is Null is becoming just [Forms]![frmClassPayqry]![Start Date], without the rest of the statement

Weird. I am assuming it has something to do with the frmClassPayqry form and how it is built (with text boxes named, say NSG Number)


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));