Strip hyphens from field

esskaykay

Registered User.
Local time
Today, 02:57
Joined
Mar 8, 2003
Messages
267
We have a database tracking construction plans. In most instances the plan number is a 6 character value displayed with hyphens:

Display = 98-12-17
Field Value = 981217

I have a search criteria set as:
=Left([Plan_No],2) & Mid([Plan_No],4,2) & Right([Plan_No],2)

This works fine as long as the plan number is only 6 characters. However, in some instances this is not the case (i.e., 98-12-17A). I could use a IIF and LEN() statement which works in this case. But, to really muddy the waters, there are fewer other non-plan files filed and indexed as example 8C-123.

I’m not positive this is exactly what I want until I play with it a bit, but, is there a way to strip all hyphens from the field Plan_No?

Thanks,
SKK
 
Perhaps use Replace

Replace([YourFieldName], "-", "")
 
Excellent, I will play with this and let you know.

Thanks again,
SKK
 

Users who are viewing this thread

Back
Top Bottom