GrandMasterTuck
In need of medication
- Local time
- Today, 18:22
- Joined
- May 4, 2013
- Messages
- 129
[SOLVED] Yet another issue with LIKE OR IS NULL
Hi everybody. I had a strange issue dealing with a search form I was trying to create, you can read about that here if you want:
http://www.access-programmers.co.uk/forums/showthread.php?t=276166
The issue was solved, but I've discovered that there are two problems with the solution I got.
1. The query, once written, cannot be re-opened, or Access freezes and crashes. I kept deleting it and recreating it (no small amount of work), and again, it works PERFECT, but I can't view it in Design or SQL view because it crashes. I tried to create another new one but with fewer fields, and THAT one opens, but there are literally HUNDREDS of rows (not columns) in the query, with all possible combinations of the code across a row. I have like ten columns in this table I'm querying, and I end up with every possible combination of that code, sometimes with the LIKE statement and other times with the NULL statement. For instance, in the first row, I have the LIKE part of the statement in the first column, and the IS NULL part in the second, third, fourth and so on. Then in the second row, I have the LIKE statement in the first AND the second, then the NULLS in the rest, and it goes on like that for THOUSANDS of rows. If I modify ANYTHING, Access freezes and then crashes, or gives me a QUERY TOO COMPLEX error.
2. The disappearing records issue crops up again if I try to link any tables together in the query. For instance, I have a CUSTOMER table, and an ADDRESS table (wherein each one customer may have several addresses on record) linked one to many. If I put fields from both tables in the query, records that showed up with the single table query stop showing up in the two-table query, and I think it's because that particular customer has no related records in the other table (no addresses on file).
This issue is a royal pain in the neck for me. Unfortunately I get like one day every like two months to look at this, and each time, I smash head first into this stupid search screen.
Is there a more simple way to create a frigging search screen, wherein the user can type anything they want into any of the fields that appear in any of the linked tables, and have the system return records that match EVERYTHING the user typed, but at the same time, if the user leaves a particular field blank, it returns everybody? What the heck am I doing wrong?
Let me know if you guys want to see the database (modified to remove any identifying info, of course). It's making me nuts, and I can't figure out why it won't work... Thanks again!
Hi everybody. I had a strange issue dealing with a search form I was trying to create, you can read about that here if you want:
http://www.access-programmers.co.uk/forums/showthread.php?t=276166
The issue was solved, but I've discovered that there are two problems with the solution I got.
1. The query, once written, cannot be re-opened, or Access freezes and crashes. I kept deleting it and recreating it (no small amount of work), and again, it works PERFECT, but I can't view it in Design or SQL view because it crashes. I tried to create another new one but with fewer fields, and THAT one opens, but there are literally HUNDREDS of rows (not columns) in the query, with all possible combinations of the code across a row. I have like ten columns in this table I'm querying, and I end up with every possible combination of that code, sometimes with the LIKE statement and other times with the NULL statement. For instance, in the first row, I have the LIKE part of the statement in the first column, and the IS NULL part in the second, third, fourth and so on. Then in the second row, I have the LIKE statement in the first AND the second, then the NULLS in the rest, and it goes on like that for THOUSANDS of rows. If I modify ANYTHING, Access freezes and then crashes, or gives me a QUERY TOO COMPLEX error.
2. The disappearing records issue crops up again if I try to link any tables together in the query. For instance, I have a CUSTOMER table, and an ADDRESS table (wherein each one customer may have several addresses on record) linked one to many. If I put fields from both tables in the query, records that showed up with the single table query stop showing up in the two-table query, and I think it's because that particular customer has no related records in the other table (no addresses on file).
This issue is a royal pain in the neck for me. Unfortunately I get like one day every like two months to look at this, and each time, I smash head first into this stupid search screen.
Is there a more simple way to create a frigging search screen, wherein the user can type anything they want into any of the fields that appear in any of the linked tables, and have the system return records that match EVERYTHING the user typed, but at the same time, if the user leaves a particular field blank, it returns everybody? What the heck am I doing wrong?
Let me know if you guys want to see the database (modified to remove any identifying info, of course). It's making me nuts, and I can't figure out why it won't work... Thanks again!
Last edited: