If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
filtering in queries
I have a table with a field that is to be formatted as "99999-9999-999" where
the N stands for a digit: 5 digits, dash, 4 digits, dash 3 digits. I have purposly not formatted the input field because due to government fiddling, the format may change. However, for the time being, I need to periodically check to see that this format is being observed. I have created a query that uses the following criteria: not like "*****-****-***" and it does find some but not all irregular entries. Is there a more specific way of showing the format that I'm searching for in a query? That is showing, exact placement of digits only (no alpha allowed). I'm stumped on this one. ANy help would be most appreciated. -- Norm Shimmel Butler, PA |
#2
|
|||
|
|||
filtering in queries
To look for alpha use NOT LIKE "#"
You can use Instr() to test for the dash. Bonnie http://www.dataplus-svc.com NES wrote: I have a table with a field that is to be formatted as "99999-9999-999" where the N stands for a digit: 5 digits, dash, 4 digits, dash 3 digits. I have purposly not formatted the input field because due to government fiddling, the format may change. However, for the time being, I need to periodically check to see that this format is being observed. I have created a query that uses the following criteria: not like "*****-****-***" and it does find some but not all irregular entries. Is there a more specific way of showing the format that I'm searching for in a query? That is showing, exact placement of digits only (no alpha allowed). I'm stumped on this one. ANy help would be most appreciated. -- Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
filtering in queries
Works like a charm. Thank you. I've actually used the dash in the string
rather than using inst(). Seems to work. Thanks again. -- Norm Shimmel Butler, PA "bhicks11 via AccessMonster.com" wrote: To look for alpha use NOT LIKE "#" You can use Instr() to test for the dash. Bonnie http://www.dataplus-svc.com NES wrote: I have a table with a field that is to be formatted as "99999-9999-999" where the N stands for a digit: 5 digits, dash, 4 digits, dash 3 digits. I have purposly not formatted the input field because due to government fiddling, the format may change. However, for the time being, I need to periodically check to see that this format is being observed. I have created a query that uses the following criteria: not like "*****-****-***" and it does find some but not all irregular entries. Is there a more specific way of showing the format that I'm searching for in a query? That is showing, exact placement of digits only (no alpha allowed). I'm stumped on this one. ANy help would be most appreciated. -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
filtering in queries
Made my day!
Bonnie http://www.dataplus-svc.com NES wrote: Works like a charm. Thank you. I've actually used the dash in the string rather than using inst(). Seems to work. Thanks again. To look for alpha use NOT LIKE "#" [quoted text clipped - 20 lines] I'm stumped on this one. ANy help would be most appreciated. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200807/1 |
Thread Tools | |
Display Modes | |
|
|