 |
|
 |
|
Next: Update field not working
|
| Author |
Message |
External

Since: Nov 26, 2008 Posts: 8
|
(Msg. 1) Posted: Thu Sep 17, 2009 10:10 am
Post subject: Comparing memo fields, and displaying differences Archived from groups: microsoft>public>access>modulesdaovba, others (more info?)
|
|
|
I've got an application where I track changes to a specific memo field,
saving the previous version to a History table. One of my users has asked if
I can create a form where he can pull up the previous version, and the new
version for comparison. Obviously no sweat, so far. But what he really
wants is to be able to look at the form, and see what has changed from the
original to the new version (sort of like tracking changes in word).
My thought is to use a text box set to Rich Text for the latest version, and
compare the two strings word by word, when a difference occurs, insert a html
tag to change the color in the new version. I know this method is frought
with pitfalls, so I was wondering whether anybody has done something similar
and could provide some tips.
------
Dale >> Stay informed about: Comparing memo fields, and displaying differences |
|
| Back to top |
|
 |  |
External

Since: Sep 17, 2009 Posts: 1
|
(Msg. 2) Posted: Thu Sep 17, 2009 10:18 am
Post subject: RE: Comparing memo fields, and displaying differences Archived from groups: per prev. post (more info?)
|
|
|
I'm not sure if you could make it work, but I use a program called WinDiff to
compare two text files. It shows the line numbers/highlights changes, etc.
Pretty handy actually.
I'm thinking maybe you could export the memo to a text file, but I don't
know how you'd get around the lack of word wrapping (maybe to an rft? I'm not
sure if WinDiff works with it)...
Anyway, it might be worth looking into, may save lots of time trying to
re-write a comparison module if no one else has any ideas. >> Stay informed about: Comparing memo fields, and displaying differences |
|
| Back to top |
|
 |  |
External

Since: Dec 8, 2008 Posts: 16
|
(Msg. 3) Posted: Thu Sep 17, 2009 1:42 pm
Post subject: Re: Comparing memo fields, and displaying differences Archived from groups: per prev. post (more info?)
|
|
|
To do this at all would take a major programming effort.
Highlighting the FIRST change would be simple, highlighting all the changes
would be much more difficult.
For example:
Line one in tableA
Now is the time for good men to come to the party and country [string ended]
Line one in tableB
Nom is the time for all good men to come to the party country and there are
lots more words after this
Changes:
First word Now vs Nom
Do you highlight the WORD or do you highlight the letter.
Word added after "for" so now all words in from word 6 on differ until we get
to Country where the words are in synch again. However note that the string
"good men to come to the party" is not a change.
And All the extended text would be highlighted.
Easier might be to export the strings to two separate Word documents and use
the Word's ability to compare the two strings. Perhaps you could then extract
the compared information and get it into a rich text field/control.
NomNow is the time for all good men to come to the party and country and there
are lots more words after this.
In the above Nom is struck through, Now is underlined, all is struck through,
"and" is underlined, all the trailing words after country are struck through.
Good luck.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Dale Fye wrote:
> I've got an application where I track changes to a specific memo field,
> saving the previous version to a History table. One of my users has asked if
> I can create a form where he can pull up the previous version, and the new
> version for comparison. Obviously no sweat, so far. But what he really
> wants is to be able to look at the form, and see what has changed from the
> original to the new version (sort of like tracking changes in word).
>
> My thought is to use a text box set to Rich Text for the latest version, and
> compare the two strings word by word, when a difference occurs, insert a html
> tag to change the color in the new version. I know this method is frought
> with pitfalls, so I was wondering whether anybody has done something similar
> and could provide some tips.
>
> ------
> Dale
> >> Stay informed about: Comparing memo fields, and displaying differences |
|
| Back to top |
|
 |  |
External

Since: Nov 26, 2008 Posts: 8
|
(Msg. 4) Posted: Thu Sep 17, 2009 1:42 pm
Post subject: Re: Comparing memo fields, and displaying differences Archived from groups: per prev. post (more info?)
|
|
|
John,
I know! Thus my statement " I know this method is frought
with pitfalls".
For now, my thought is to highlight the word, not the character. I'm still
trying to figure out how to do a strikethrough in an RTF enabled textbox.
I found all sorts of compare text utilities in a web search, but all
appeared to be freeware, or a comercial product. Didn't find any code
examples.
----
Dale
"John Spencer" wrote:
> To do this at all would take a major programming effort.
> Highlighting the FIRST change would be simple, highlighting all the changes
> would be much more difficult.
>
> For example:
> Line one in tableA
> Now is the time for good men to come to the party and country [string ended]
>
> Line one in tableB
> Nom is the time for all good men to come to the party country and there are
> lots more words after this
>
> Changes:
> First word Now vs Nom
> Do you highlight the WORD or do you highlight the letter.
>
> Word added after "for" so now all words in from word 6 on differ until we get
> to Country where the words are in synch again. However note that the string
> "good men to come to the party" is not a change.
>
> And All the extended text would be highlighted.
>
> Easier might be to export the strings to two separate Word documents and use
> the Word's ability to compare the two strings. Perhaps you could then extract
> the compared information and get it into a rich text field/control.
>
> NomNow is the time for all good men to come to the party and country and there
> are lots more words after this.
>
> In the above Nom is struck through, Now is underlined, all is struck through,
> "and" is underlined, all the trailing words after country are struck through.
>
> Good luck.
>
> John Spencer
> Access MVP 2002-2005, 2007-2009
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Dale Fye wrote:
> > I've got an application where I track changes to a specific memo field,
> > saving the previous version to a History table. One of my users has asked if
> > I can create a form where he can pull up the previous version, and the new
> > version for comparison. Obviously no sweat, so far. But what he really
> > wants is to be able to look at the form, and see what has changed from the
> > original to the new version (sort of like tracking changes in word).
> >
> > My thought is to use a text box set to Rich Text for the latest version, and
> > compare the two strings word by word, when a difference occurs, insert a html
> > tag to change the color in the new version. I know this method is frought
> > with pitfalls, so I was wondering whether anybody has done something similar
> > and could provide some tips.
> >
> > ------
> > Dale
> >
> >> Stay informed about: Comparing memo fields, and displaying differences |
|
| Back to top |
|
 |  |
External

Since: Dec 12, 2008 Posts: 6
|
(Msg. 5) Posted: Thu Sep 17, 2009 5:22 pm
Post subject: Re: Comparing memo fields, and displaying differences Archived from groups: per prev. post (more info?)
|
|
|
The simplest I can see is to identify the start of the differences (first
character that doesn't match) and the end of the differences (first
character from the right that doesn't match. You could highlight everything
between those 2 locations.
I've thought about this issue before too, and I've considered writing code
to have Word display the differences. It does a nice job, and I don't think
it's nearly as much code to automate Word as it would be to do an equally
good job.
"Dale Fye" wrote in message
> John,
>
> I know! Thus my statement " I know this method is frought
> with pitfalls".
>
> For now, my thought is to highlight the word, not the character. I'm
> still
> trying to figure out how to do a strikethrough in an RTF enabled textbox.
>
> I found all sorts of compare text utilities in a web search, but all
> appeared to be freeware, or a comercial product. Didn't find any code
> examples.
>
> ----
> Dale
>
>
>
> "John Spencer" wrote:
>
>> To do this at all would take a major programming effort.
>> Highlighting the FIRST change would be simple, highlighting all the
>> changes
>> would be much more difficult.
>>
>> For example:
>> Line one in tableA
>> Now is the time for good men to come to the party and country [string
>> ended]
>>
>> Line one in tableB
>> Nom is the time for all good men to come to the party country and there
>> are
>> lots more words after this
>>
>> Changes:
>> First word Now vs Nom
>> Do you highlight the WORD or do you highlight the letter.
>>
>> Word added after "for" so now all words in from word 6 on differ until we
>> get
>> to Country where the words are in synch again. However note that the
>> string
>> "good men to come to the party" is not a change.
>>
>> And All the extended text would be highlighted.
>>
>> Easier might be to export the strings to two separate Word documents and
>> use
>> the Word's ability to compare the two strings. Perhaps you could then
>> extract
>> the compared information and get it into a rich text field/control.
>>
>> NomNow is the time for all good men to come to the party and country and
>> there
>> are lots more words after this.
>>
>> In the above Nom is struck through, Now is underlined, all is struck
>> through,
>> "and" is underlined, all the trailing words after country are struck
>> through.
>>
>> Good luck.
>>
>> John Spencer
>> Access MVP 2002-2005, 2007-2009
>> The Hilltop Institute
>> University of Maryland Baltimore County
>>
>> Dale Fye wrote:
>> > I've got an application where I track changes to a specific memo field,
>> > saving the previous version to a History table. One of my users has
>> > asked if
>> > I can create a form where he can pull up the previous version, and the
>> > new
>> > version for comparison. Obviously no sweat, so far. But what he
>> > really
>> > wants is to be able to look at the form, and see what has changed from
>> > the
>> > original to the new version (sort of like tracking changes in word).
>> >
>> > My thought is to use a text box set to Rich Text for the latest
>> > version, and
>> > compare the two strings word by word, when a difference occurs, insert
>> > a html
>> > tag to change the color in the new version. I know this method is
>> > frought
>> > with pitfalls, so I was wondering whether anybody has done something
>> > similar
>> > and could provide some tips.
>> >
>> > ------
>> > Dale
>> >
>> >> Stay informed about: Comparing memo fields, and displaying differences |
|
| Back to top |
|
 |  |
External

Since: Dec 19, 2008 Posts: 2
|
(Msg. 6) Posted: Fri Sep 18, 2009 11:26 am
Post subject: Re: Comparing memo fields, and displaying differences Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
| Related Topics: | Displaying Yes/no fields the same on all computers sometim.. - I have a Access database on a network. On some computers a list box that displays the results of a query with a yes/no field in it is displayed as either yes or no but on other computers the same field is displayed as -1 or 0. How do I get this to....
Adding controls to a memo -
I need part of a memo field - I have a memo fleld called "TITLE". I need to extract part of the field that contains this information: TM:T-6225-CT-MMC-010/59180 (but only the part after the ":") It may appear at the very end (nothing would be after /59180) It m...
Combo box not displaying field from SQL backend - I am using Access 2007 with an MS SQL Server 2005 backend (via linked tables). One of the SQL tables is tblDepartments. Two of the SQL fields are the Primary Key (PK) which is a GUID, and Dept Name, which is text. When I try to use the combo box..
Curious "too many fields" error - I'm doing an extract query from a table with a lot of fields (98). (Not my database.) I'm only pulling about a dozen out. The query works unless I try to export it to a new spreadsheet. I've done a compact and repair, to no avail. It's Access 2003. ... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|