Hmmmmmmmmmmm,
"Point and Click".
Open up the visual basic editor. A way to do this is to click on the "Modules" label / button in the database window. THAT is the one which has lists of the various thinnnggggyyyyyyys (Tables | Queries | Forms | Reports | Macros | Modules). Then click on where is says "new". Ipso Presto a new (Mostly Blank) screen/ window Appears.
Now, come back to Tek-Tips and select the proceuder you want to use (Terry's or Mine). Use the Standard Windows Block stuff to "Highlight" the part from:
Public Function ...
down to
End Function
Don't worry much if you get an extra line or so, you can just delete them later.
Play "Switch" (AGAIN!), back to the Vb Editor window opened earlier.
Place the "cursor" anywhere in the window and just do the Win Paste operation. The procedure should appear, with (hopefully) better formatting than in the Tek-Tips windows.
Congradlations. You hae just created a "Module" with a Procedure in Visual Basic.
Now, you need to Save it. That is the little floppy disc icon on the tool bar. Click it and follow the signs. Give it a NAME which you can rember / relate to (DieselBreathModule ?)
SElect the database Window again. Select Queries. Select New. A split window appears with a Tables/queries/both dialog box in front of it. ASSUMIING that your ugly strings are in a table, these are preselected. So, scroll down until you find the table with the ugly string stuff and DOUBLE CLICK it. Click close on the DIALOG BOX. It (Mysteriiously?) vanishes and you are looking at the split window. the top is the 'battleship grey' while the bottom looks like (and actually is!) a grid. Your table (with the funny strings) is in the top, with the fields listed (You may need to scroll through the list to find the field). Find the field and DOUBLE Click it. Amazingly, the field appears in the grid (First Column Top Row)! For the exampe, I'll call it FieldX. When you do the following, this (FieldX) refers to the field name you selected.
Place the cursor in the grid in the same square as FieldX. If the Filed name is "selected", press F2 (Function Key 2). the field should be in "edit" mode. Hit the home key. the cursor should be at the LEFT of FieldX. If it is, type "NewFmt: basRemNonNums([" Hit the "End" key. Type "])"
The cell should read:
NewFmt: basRemNonNums([FieldX]) Asuming you were BRAVE and selected NY version. Otherwise, substitute Terry's procedure name.
"Run" the query. Either Click on the "Bang" (Exclamation sign on the menu bar) or click on the "grid" symbol on the Tool Bar.
If it doesn't work. Take two ???? and post in the AM. I'm out of here for the night!!!
MichaelRed
mred@att.net
There is never time to do it right but there is always time to do it over