Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No duplicates in table allowed exept when... 3

Status
Not open for further replies.

JustSara

IS-IT--Management
Mar 25, 2003
8
US
I have a table that holds all my customer information and a field in that table is called Job Numbers. I have it set to Index No Duplicates. This works fine when I'm actually inputting information from a customer that has a job number.

However, I've discovered I have customer information with no job numbers and I want to put a 5 digit code for those customers (00000) so I can easily find them later. But oops, the field is set to No Duplicates. How can I have the field be No Duplicates except when it comes to a certain value ie: 00000.

Much Thanks
Sara Heiselmann
 
JustSara

Don't REQUIRE the field and instead of looking for 00000 later you can look for that field being NULL. Same result.

Hope this helps.

Jim

"Get it right the first time, that's the main thing..." [wavey]
 
That would be great except my company gets mailing address from several different areas. I was hoping to use 00000 for construction companies and 11111 for military companies and 22222 for Police department addresses...

Maybe I should just create a dropdown menu instead. =)
 
Sara

Good idea. You can use the dropdown box to allow them to enter 00000, 11111 as appropriate, but also let users add something that's not in the list, such as the actual job #.

Then you can do your filtering later.

You can get really fancy and have users sign in and assign a departmental default job # of 00000, 11111, etc. that the user can replace with the real job # during input. Just an idea.

Hope this helps.

Jim

"Get it right the first time, that's the main thing..." [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top