Hendrik,
I have added materials - database and word doc - to the hendrik1.zip and made it available at this link since is too large for the forum.
Let me know if you can access the file and if it's useful to you. Post in the forum if you need any help.
Good luck.
Good morning Orange
Thank you, but I cannot get to the file, it opens my dropbox and says "The folder ‘/hendrik1.zip’ doesn’t exist."
Last edited by hendrikbez; 08-06-2019 at 05:21 AM.
Hendrik,
Did you get an email to view the file? I put the file where I put the original Xword. I'm not sure why you couldn't get to the latest zip, but I did put your email on for sharing.
Try https://www.dropbox.com/s/tzz1yx945u...drik1.zip?dl=0
OrangeHendrik,
Did you get an email to view the file? I put the file where I put the original Xword. I'm not sure why you couldn't get to the latest zip, but I did put your email on for sharing.
Try https://www.dropbox.com/s/tzz1yx945u...drik1.zip?dl=0
Thank you I have got the file from the link that you have sent me.
Good! Read the word file for context. The textfile and table layouts are required (can not be modified without code changes).
Keep in touch. I am interested in your project.
Hi orange
I am going true the info you have send me, and I have seen a problem, (maybe I am wrong here).
But when I want to add a word to the list that is already in, it is adding them top the list, I have a woord “skoon” in the list, and I have used the add word box, and I have added the word about 3 times and now there are
4 of the same words in.
English is not my first language, so I do not understand what you mean with “include word” .
What is fIncludeWord for in the table
Last edited by hendrikbez; 08-07-2019 at 04:29 AM.
Hi Hendrik,
fIncludeWord is used to include or exclude a word from a Search. When words are added, fIncludeWord is set to 0 by default. When you select Exclude, then fIncludeWord is set to non 0 for that word and it is not included in the search. In the current code , I use the following to indicate Exclude
Can you post a copy of your database? Are you using the latest version I sent? PM me if you need more info.Code:set fIncludeWord = 5
If you are more comfortable in your native language, then write the details there and use Google translate to English before posting. The translation is more than adequate for communication.
orange
Orange
I need your email, to give you access to the file in dropbox or google drive, can you pm me it, please
Hi again Hendrik,
I looked at your file briefly. I tried to Add Single "skoon" and it was accepted. Testing showed I was not checking if word already existed in the ADD Single routine --it was there for the others. I think I may have cut it and pasted???
Any way this code should resolve the issue
This is the revised code at line 40 in Private Sub FrameOptions_AfterUpdate() of Form1.Code:'check for empty string or word already exists 40 If Len(Me.SearchText & "") = 0 Or _ DCount("*", "wordlist", "fword ='" & Me.SearchText & "'") > 0 Then 50 Debug.Print "Attempt to ADD <" & Me.SearchText & "> an empty string or word already exists" 60 Err.Raise 4443 ' custom error signifying attempt to add empty string or existing word to wordlist
I had to use >0 rather than =1, since "skoon" was added 4 times.
You may have to modify your error messages!!!Code:SELECT WordList.fword, WordList.ID FROM WordList WHERE (((WordList.fword)="skoon")); fword ID skoon 367177 skoon 491234 skoon 491235 skoon 491236
I do not understand your numeric prefixes to your words in Wordlist.
Let me know if you find something else or have any questions.
Update:::
I just checked my database and I can not add multiple instances of the same word. I fail on error 3022 attempt to add a duplicate record.
That error is trapped in
I'll look again at your code, but the workaround/code to resolve the issue at top of this post should work.Code:FrameOptions_AfterUpdate_Error: 540 If Err.Number = 4443 Then 550 MsgBox "You can not add an empty string as a Word", vbOKOnly 560 ElseIf Err.Number = 4444 Then 570 MsgBox "You can not add a string with wildcard(s) as a Word", vbOKOnly 580 ElseIf Err.Number = 3022 Then 590 MsgBox "<" & Me.SearchText & "> already exists, so can not be added", vbOKOnly 600 Else 610 MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure CheckAddSingle_Click, line " & Erl & "." 620 End If 630 GoTo ResetCheckboxes
Good luck.
Another update
A little more investigation. You do not have fWord set to indexed no duplicates in table Wordlist.
I ran this query to identify duplicates/replicates and get the ID values
And got this ResultCode:select id,fword from wordlist where fword in (SELECT WordList.fword FROM WordList group by fword having (((Count(WordList.fword))>1)))
I deleted last 4, then set fword Indexed no duplicatesCode:id fword 367177 skoon 491234 skoon 491235 skoon 491236 skoon 491237 skoon
and your database now finds the Attempt to add duplicate via the 3022 error check.
Good luck.
Last edited by orange; 08-07-2019 at 10:00 AM. Reason: spelling
Orange
Thank you, will look at this morrow, going to a prayer meeting now.
Orange
Got it to work, thank you