Dennis Kowallek wrote:
On Fri, 6 Jan 2006 14:03:23 +1100, "Jennifer Crockett"
<[EMAIL PROTECTED]> wrote:
I think the update query to remove an initial blank line from event
notes would be...
UPDATE tblER
SET [Desc]=Mid([Desc],3)
WHERE Asc([Desc])=13;
This assumes there are NO spaces in that initial blank line ... just a
CRLF pair.
Maybe Brian can confirm this.
As always, make a backup of your database first. The usual disclaimers
apply.
I didn't originally know that there would be a CRLF pair on the
blank line so I had to run two update queries. After deleting the
ASCII 13 (CR) I inspected the fields and saw that there was still
an ASCII 10 (LF) character at the beginning of the field. The
update query I would run now would be:
Update tblER
SET [Desc] = Right([Desc], Len([Desc]-2))
WHERE Chr$(Left([Desc],1) = CHR$(13))
Since her Problem related to the Desc of Census events I also
used a join of tblER and tblET (The Event Type) to select only
Census events (IDET=12)
The set trims the first 2 characters (the CRLF pair) from the
Desc field. I used the Len-2 function to make sure that all the
characters in the Desc field except the CRLF {CHR$(13),CHR$(10)}
were retained.
I just read the Access Help and now realize that your command MID
([Desc],3 ) would have returned the same result since it defaults
to all characters in the text after the start point if there is
no specified number of characters to return. I was being extra
careful last night not to drop any of Gail's notes.
Gail has contacted me off list to say that the file is now OK.
Brian Kelly
Legacy User Group guidelines can be found at:
http://www.LegacyFamilyTree.com/Etiquette.asp
To find past messages, please go to our searchable archives at:
http://www.mail-archive.com/legacyusergroup%40mail.millenniacorp.com/
To unsubscribe please visit: http://www.legacyfamilytree.com/LegacyLists.asp