I am developing a program that takes a length of a word and depending on the length will enter the number of letters in the word into the "LtrCode" Field. However, in running the program, it works well until this point.
WrdLen = Len(Wrd)
MsgBox "WrdLen = " & WrdLen
'I am able to get the length of the word which in this case is 3
Select Case WrdLen
Case WrdLen = 1
RTarget("LtrCode") = 1
Case WrdLen = 2
RTarget("LtrCode") = 2
Case WrdLen = 3 'At this point I Try to update the database to add the new data.
RTarget.AddNew
RTarget("Ltr") = Wrd
RTarget("LtrCode ") = 3
RTarget.Update
Case WrdLen = 4
RTarget("LtrCode") = 4
End Select
As the last part I have a MsgBox "LtrCode = " & RTarget("LtrCode")
and a MsgBox "Ltr = " & RTarget("Ltr")
When the program runs I get a return of
LtrCode = 0
Ltr =
What am I doing wrong?
I have two database an RSource that has the full sentence and an RTarget that breaks down the sentence into words and letters.
Anyhelp in this would be greatly appreciated.
Thank you for your time and help in this matter.
Robert M
WrdLen = Len(Wrd)
MsgBox "WrdLen = " & WrdLen
'I am able to get the length of the word which in this case is 3
Select Case WrdLen
Case WrdLen = 1
RTarget("LtrCode") = 1
Case WrdLen = 2
RTarget("LtrCode") = 2
Case WrdLen = 3 'At this point I Try to update the database to add the new data.
RTarget.AddNew
RTarget("Ltr") = Wrd
RTarget("LtrCode ") = 3
RTarget.Update
Case WrdLen = 4
RTarget("LtrCode") = 4
End Select
As the last part I have a MsgBox "LtrCode = " & RTarget("LtrCode")
and a MsgBox "Ltr = " & RTarget("Ltr")
When the program runs I get a return of
LtrCode = 0
Ltr =
What am I doing wrong?
I have two database an RSource that has the full sentence and an RTarget that breaks down the sentence into words and letters.
Anyhelp in this would be greatly appreciated.
Thank you for your time and help in this matter.
Robert M