From: kevcar40 on 3 Sep 2009 03:18 On 2 Sep, 07:06, kevcar40 <kevca...(a)btinternet.com> wrote: > On 2 Sep, 06:50, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > On Sep 1, 12:22 pm, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > On 1 Sep, 08:13, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > On Sep 1, 8:28 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > Hi > > > > > i have the following code to check the spelling ot text entered into a > > > > > text box > > > > > it works fine > > > > > however a message box appears saying Spelling check complete if there > > > > > is no spelling error > > > > > > If Len(Me!Reason & "") > 0 Then > > > > > DoCmd.RunCommand acCmdSpelling > > > > > Else > > > > > Exit Sub > > > > > End If > > > > > > Is it possible to stop this message appearing if there is no spelling > > > > > mistake > > > > > > thanks > > > > > > kevin > > > > > Hi, > > > > > Private Sub Text_AfterUpdate() > > > > 'Call CheckSpelling(Me) > > > > If Len(Me!text & "") > 0 Then > > > > DoCmd.SetWarnings False > > > > DoCmd.RunCommand acCmdSpelling > > > > DoCmd.SetWarnings True > > > > Else > > > > Exit Sub > > > > End If > > > > End Sub > > > > > However, this willspell-check all the fields/records. Better approach > > > > is to use the following code - add tag property "SpellCheck" for field > > > > (s) for which you want to runspellcheck: > > > > > Private Sub Text_AfterUpdate() > > > > Call CheckSpelling(Me) > > > > End Sub > > > > > Function CheckSpelling(ByRef frmFormName As Form) > > > > Dim ctlControlName As Control > > > > DoCmd.SetWarnings False > > > > For Each ctlControlName In frmFormName > > > > Select Case ctlControlName.ControlType > > > > Case acTextBox > > > > If Nz(ctlControlName, "") <> "" Then > > > > If ctlControlName.Tag = "SpellCheck" Then > > > > With ctlControlName > > > > .SetFocus > > > > .SelStart = 0 > > > > .SelLength = Len(ctlControlName) > > > > End With > > > > DoCmd.RunCommand acCmdSpelling > > > > End If > > > > End If > > > > End Select > > > > Next ctlControlName > > > > DoCmd.SetWarnings True > > > > End Function > > > > > Add spaces/tabs to code to have it readable. > > > > > Regards, > > > > Branislav Mihaljev > > > > Microsoft Access MVP- Hide quoted text - > > > > > - Show quoted text - > > > > ok trying it now > > > can you give me a little clarification please > > > my form is called inhibitors > > > the text box to check is called reason > > > Do i need to change "ByRef frmFormName As Form" to "ByRef > > > inhibitors As Form > > > and all occurrances of frmFormname > > > > and do i need to change ctlcontrolName to Me.reason > > > > thanks again > > > > kevin > > > Hi, > > > Open form in Design View, select field(s) for which you want to run > >SpellCheck, open Properties window and find in the list property > > "Tag". Write there "SpellCheck" (without quotes). > > > In your case select field "reason", find in Property window event > > AfterUpdate, select [Event Procedure] and click "...". Code should > > look like this: > > > Private Sub reason_AfterUpdate() > > Call CheckSpelling(Me) > > End Sub > > > Add new module, copy above function (Function CheckSpelling) and save > > it by name "modSpellCheck". While you are there - in VBA window, click > > menu Debug > Compile to make sure there are no errors in code. > > > Run form, try to enter text in field "reason" both without and with > >spellerrors. It should pop-upspellcheckerwhen there is an error > > only, without message "SpellCheck completed". > > > Above approach will runSpellCheck for particular field only and for > > the one record only - the one which got new value. > > > Regards, > > Branislav Mihaljev > > Microsoft Access MVP- Hide quoted text - > > > - Show quoted text - > > thank you very much for your time- Hide quoted text - > > - Show quoted text - i have followed your instruction my Event procedure looks like the following Private Sub Reason_AfterUpdate() Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! [Dates].Value Call CheckSpelling(Me) End Sub problem is if there is an incorrectly spelt word i get the following error message "the macro or function set to the beforeupdate or validationRule property for this field is preventing Microsoft Office Access from saving the data in the field if this is a macro, open the macro in the macro window and reomve the action that forces the save if the macro includes a setvalue action, set the macro to Afterupdate property of the control instead if this is a function, redfine the function in the module window" This error pops up when change has been selected for the incorrectly spelt word an ideas thank kevin
From: [MVP] on 8 Sep 2009 05:52 On Sep 3, 9:18 am, kevcar40 <kevca...(a)btinternet.com> wrote: > On 2 Sep, 07:06, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > On 2 Sep, 06:50, "[MVP]" <ban...(a)gmail.com> wrote: > > > > On Sep 1, 12:22 pm, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > On 1 Sep, 08:13, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > > On Sep 1, 8:28 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > Hi > > > > > > i have the following code to check the spelling ot text entered into a > > > > > > text box > > > > > > it works fine > > > > > > however a message box appears saying Spelling check complete if there > > > > > > is no spelling error > > > > > > > If Len(Me!Reason & "") > 0 Then > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > Else > > > > > > Exit Sub > > > > > > End If > > > > > > > Is it possible to stop this message appearing if there is no spelling > > > > > > mistake > > > > > > > thanks > > > > > > > kevin > > > > > > Hi, > > > > > > Private Sub Text_AfterUpdate() > > > > > 'Call CheckSpelling(Me) > > > > > If Len(Me!text & "") > 0 Then > > > > > DoCmd.SetWarnings False > > > > > DoCmd.RunCommand acCmdSpelling > > > > > DoCmd.SetWarnings True > > > > > Else > > > > > Exit Sub > > > > > End If > > > > > End Sub > > > > > > However, this willspell-check all the fields/records. Better approach > > > > > is to use the following code - add tag property "SpellCheck" for field > > > > > (s) for which you want to runspellcheck: > > > > > > Private Sub Text_AfterUpdate() > > > > > Call CheckSpelling(Me) > > > > > End Sub > > > > > > Function CheckSpelling(ByRef frmFormName As Form) > > > > > Dim ctlControlName As Control > > > > > DoCmd.SetWarnings False > > > > > For Each ctlControlName In frmFormName > > > > > Select Case ctlControlName.ControlType > > > > > Case acTextBox > > > > > If Nz(ctlControlName, "") <> "" Then > > > > > If ctlControlName.Tag = "SpellCheck" Then > > > > > With ctlControlName > > > > > .SetFocus > > > > > .SelStart = 0 > > > > > .SelLength = Len(ctlControlName) > > > > > End With > > > > > DoCmd.RunCommand acCmdSpelling > > > > > End If > > > > > End If > > > > > End Select > > > > > Next ctlControlName > > > > > DoCmd.SetWarnings True > > > > > End Function > > > > > > Add spaces/tabs to code to have it readable. > > > > > > Regards, > > > > > Branislav Mihaljev > > > > > Microsoft Access MVP- Hide quoted text - > > > > > > - Show quoted text - > > > > > ok trying it now > > > > can you give me a little clarification please > > > > my form is called inhibitors > > > > the text box to check is called reason > > > > Do i need to change "ByRef frmFormName As Form" to "ByRef > > > > inhibitors As Form > > > > and all occurrances of frmFormname > > > > > and do i need to change ctlcontrolName to Me.reason > > > > > thanks again > > > > > kevin > > > > Hi, > > > > Open form in Design View, select field(s) for which you want to run > > >SpellCheck, open Properties window and find in the list property > > > "Tag". Write there "SpellCheck" (without quotes). > > > > In your case select field "reason", find in Property window event > > > AfterUpdate, select [Event Procedure] and click "...". Code should > > > look like this: > > > > Private Sub reason_AfterUpdate() > > > Call CheckSpelling(Me) > > > End Sub > > > > Add new module, copy above function (Function CheckSpelling) and save > > > it by name "modSpellCheck". While you are there - in VBA window, click > > > menu Debug > Compile to make sure there are no errors in code. > > > > Run form, try to enter text in field "reason" both without and with > > >spellerrors. It should pop-upspellcheckerwhen there is an error > > > only, without message "SpellCheck completed". > > > > Above approach will runSpellCheck for particular field only and for > > > the one record only - the one which got new value. > > > > Regards, > > > Branislav Mihaljev > > > Microsoft Access MVP- Hide quoted text - > > > > - Show quoted text - > > > thank you very much for your time- Hide quoted text - > > > - Show quoted text - > > i have followed your instruction > my Event procedure looks like the following > Private Sub Reason_AfterUpdate() > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > [Dates].Value > Call CheckSpelling(Me) > End Sub > > problem is if there is an incorrectly spelt word > i get the following error message > > "the macro or function set to the beforeupdate or validationRule > property for this field is preventing Microsoft Office Access from > saving the data in the field > > if this is a macro, open the macro in the macro window and reomve the > action that forces the save > if the macro includes a setvalue action, set the macro to Afterupdate > property of the control instead > if this is a function, redfine the function in the module window" > > This error pops up when change has been selected for the incorrectly > spelt word > > an ideas > > thank > > kevin Hi, What this does: Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! [Dates].Value ? When you type in field "reason" some text does spell check works or not? Regards, Branislav
From: kevcar40 on 10 Sep 2009 02:48 On 8 Sep, 10:52, "[MVP]" <ban...(a)gmail.com> wrote: > On Sep 3, 9:18 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > On 2 Sep, 07:06, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > On 2 Sep, 06:50, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > On Sep 1, 12:22 pm, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > On 1 Sep, 08:13, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > > > On Sep 1, 8:28 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > > Hi > > > > > > > i have the following code to check the spelling ot text entered into a > > > > > > > text box > > > > > > > it works fine > > > > > > > however a message box appears saying Spelling check complete if there > > > > > > > is no spelling error > > > > > > > > If Len(Me!Reason & "") > 0 Then > > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > > Else > > > > > > > Exit Sub > > > > > > > End If > > > > > > > > Is it possible to stop this message appearing if there is no spelling > > > > > > > mistake > > > > > > > > thanks > > > > > > > > kevin > > > > > > > Hi, > > > > > > > Private Sub Text_AfterUpdate() > > > > > > 'Call CheckSpelling(Me) > > > > > > If Len(Me!text & "") > 0 Then > > > > > > DoCmd.SetWarnings False > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > DoCmd.SetWarnings True > > > > > > Else > > > > > > Exit Sub > > > > > > End If > > > > > > End Sub > > > > > > > However, this willspell-check all the fields/records. Better approach > > > > > > is to use the following code - add tag property "SpellCheck" for field > > > > > > (s) for which you want to runspellcheck: > > > > > > > Private Sub Text_AfterUpdate() > > > > > > Call CheckSpelling(Me) > > > > > > End Sub > > > > > > > Function CheckSpelling(ByRef frmFormName As Form) > > > > > > Dim ctlControlName As Control > > > > > > DoCmd.SetWarnings False > > > > > > For Each ctlControlName In frmFormName > > > > > > Select Case ctlControlName.ControlType > > > > > > Case acTextBox > > > > > > If Nz(ctlControlName, "") <> "" Then > > > > > > If ctlControlName.Tag = "SpellCheck" Then > > > > > > With ctlControlName > > > > > > .SetFocus > > > > > > .SelStart = 0 > > > > > > .SelLength = Len(ctlControlName) > > > > > > End With > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > End If > > > > > > End If > > > > > > End Select > > > > > > Next ctlControlName > > > > > > DoCmd.SetWarnings True > > > > > > End Function > > > > > > > Add spaces/tabs to code to have it readable. > > > > > > > Regards, > > > > > > Branislav Mihaljev > > > > > > Microsoft Access MVP- Hide quoted text - > > > > > > > - Show quoted text - > > > > > > ok trying it now > > > > > can you give me a little clarification please > > > > > my form is called inhibitors > > > > > the text box to check is called reason > > > > > Do i need to change "ByRef frmFormName As Form" to "ByRef > > > > > inhibitors As Form > > > > > and all occurrances of frmFormname > > > > > > and do i need to change ctlcontrolName to Me.reason > > > > > > thanks again > > > > > > kevin > > > > > Hi, > > > > > Open form in Design View, select field(s) for which you want to run > > > >SpellCheck, open Properties window and find in the list property > > > > "Tag". Write there "SpellCheck" (without quotes). > > > > > In your case select field "reason", find in Property window event > > > > AfterUpdate, select [Event Procedure] and click "...". Code should > > > > look like this: > > > > > Private Sub reason_AfterUpdate() > > > > Call CheckSpelling(Me) > > > > End Sub > > > > > Add new module, copy above function (Function CheckSpelling) and save > > > > it by name "modSpellCheck". While you are there - in VBA window, click > > > > menu Debug > Compile to make sure there are no errors in code. > > > > > Run form, try to enter text in field "reason" both without and with > > > >spellerrors. It should pop-upspellcheckerwhen there is an error > > > > only, without message "SpellCheck completed". > > > > > Above approach will runSpellCheck for particular field only and for > > > > the one record only - the one which got new value. > > > > > Regards, > > > > Branislav Mihaljev > > > > Microsoft Access MVP- Hide quoted text - > > > > > - Show quoted text - > > > > thank you very much for your time- Hide quoted text - > > > > - Show quoted text - > > > i have followed your instruction > > my Event procedure looks like the following > > Private Sub Reason_AfterUpdate() > > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > > [Dates].Value > > Call CheckSpelling(Me) > > End Sub > > > problem is if there is an incorrectly spelt word > > i get the following error message > > > "the macro or function set to the beforeupdate or validationRule > > property for this field is preventing Microsoft Office Access from > > saving the data in the field > > > if this is a macro, open the macro in the macro window and reomve the > > action that forces the save > > if the macro includes a setvalue action, set the macro to Afterupdate > > property of the control instead > > if this is a function, redfine the function in the module window" > > > This error pops up when change has been selected for the incorrectly > > spelt word > > > an ideas > > > thank > > > kevin > > Hi, > > What this does: > > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > [Dates].Value > > ? > > When you type in field "reason" some text doesspellcheck works or > not? > > Regards, > Branislav- Hide quoted text - > > - Show quoted text - this moves a value from the main form to the sub form
From: kevcar40 on 10 Sep 2009 10:02 On 8 Sep, 10:52, "[MVP]" <ban...(a)gmail.com> wrote: > On Sep 3, 9:18 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > On 2 Sep, 07:06, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > On 2 Sep, 06:50, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > On Sep 1, 12:22 pm, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > On 1 Sep, 08:13, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > > > On Sep 1, 8:28 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > > Hi > > > > > > > i have the following code to check the spelling ot text entered into a > > > > > > > text box > > > > > > > it works fine > > > > > > > however a message box appears saying Spelling check complete if there > > > > > > > is no spelling error > > > > > > > > If Len(Me!Reason & "") > 0 Then > > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > > Else > > > > > > > Exit Sub > > > > > > > End If > > > > > > > > Is it possible to stop this message appearing if there is no spelling > > > > > > > mistake > > > > > > > > thanks > > > > > > > > kevin > > > > > > > Hi, > > > > > > > Private Sub Text_AfterUpdate() > > > > > > 'Call CheckSpelling(Me) > > > > > > If Len(Me!text & "") > 0 Then > > > > > > DoCmd.SetWarnings False > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > DoCmd.SetWarnings True > > > > > > Else > > > > > > Exit Sub > > > > > > End If > > > > > > End Sub > > > > > > > However, this willspell-check all the fields/records. Better approach > > > > > > is to use the following code - add tag property "SpellCheck" for field > > > > > > (s) for which you want to runspellcheck: > > > > > > > Private Sub Text_AfterUpdate() > > > > > > Call CheckSpelling(Me) > > > > > > End Sub > > > > > > > Function CheckSpelling(ByRef frmFormName As Form) > > > > > > Dim ctlControlName As Control > > > > > > DoCmd.SetWarnings False > > > > > > For Each ctlControlName In frmFormName > > > > > > Select Case ctlControlName.ControlType > > > > > > Case acTextBox > > > > > > If Nz(ctlControlName, "") <> "" Then > > > > > > If ctlControlName.Tag = "SpellCheck" Then > > > > > > With ctlControlName > > > > > > .SetFocus > > > > > > .SelStart = 0 > > > > > > .SelLength = Len(ctlControlName) > > > > > > End With > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > End If > > > > > > End If > > > > > > End Select > > > > > > Next ctlControlName > > > > > > DoCmd.SetWarnings True > > > > > > End Function > > > > > > > Add spaces/tabs to code to have it readable. > > > > > > > Regards, > > > > > > Branislav Mihaljev > > > > > > Microsoft Access MVP- Hide quoted text - > > > > > > > - Show quoted text - > > > > > > ok trying it now > > > > > can you give me a little clarification please > > > > > my form is called inhibitors > > > > > the text box to check is called reason > > > > > Do i need to change "ByRef frmFormName As Form" to "ByRef > > > > > inhibitors As Form > > > > > and all occurrances of frmFormname > > > > > > and do i need to change ctlcontrolName to Me.reason > > > > > > thanks again > > > > > > kevin > > > > > Hi, > > > > > Open form in Design View, select field(s) for which you want to run > > > >SpellCheck, open Properties window and find in the list property > > > > "Tag". Write there "SpellCheck" (without quotes). > > > > > In your case select field "reason", find in Property window event > > > > AfterUpdate, select [Event Procedure] and click "...". Code should > > > > look like this: > > > > > Private Sub reason_AfterUpdate() > > > > Call CheckSpelling(Me) > > > > End Sub > > > > > Add new module, copy above function (Function CheckSpelling) and save > > > > it by name "modSpellCheck". While you are there - in VBA window, click > > > > menu Debug > Compile to make sure there are no errors in code. > > > > > Run form, try to enter text in field "reason" both without and with > > > >spellerrors. It should pop-upspellcheckerwhen there is an error > > > > only, without message "SpellCheck completed". > > > > > Above approach will runSpellCheck for particular field only and for > > > > the one record only - the one which got new value. > > > > > Regards, > > > > Branislav Mihaljev > > > > Microsoft Access MVP- Hide quoted text - > > > > > - Show quoted text - > > > > thank you very much for your time- Hide quoted text - > > > > - Show quoted text - > > > i have followed your instruction > > my Event procedure looks like the following > > Private Sub Reason_AfterUpdate() > > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > > [Dates].Value > > Call CheckSpelling(Me) > > End Sub > > > problem is if there is an incorrectly spelt word > > i get the following error message > > > "the macro or function set to the beforeupdate or validationRule > > property for this field is preventing Microsoft Office Access from > > saving the data in the field > > > if this is a macro, open the macro in the macro window and reomve the > > action that forces the save > > if the macro includes a setvalue action, set the macro to Afterupdate > > property of the control instead > > if this is a function, redfine the function in the module window" > > > This error pops up when change has been selected for the incorrectly > > spelt word > > > an ideas > > > thank > > > kevin > > Hi, > > What this does: > > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > [Dates].Value > > ? > > When you type in field "reason" some text doesspellcheck works or > not? > > Regards, > Branislav- Hide quoted text - > > - Show quoted text - when i type correct spellig in to reason text box i get no problem when i mis spell a word the spell checker pops upwhen i click change i get the message and when i close the form i get the same message
From: [MVP] on 14 Sep 2009 01:08 On Sep 10, 4:02 pm, kevcar40 <kevca...(a)btinternet.com> wrote: > On 8 Sep, 10:52, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > On Sep 3, 9:18 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > On 2 Sep, 07:06, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > On 2 Sep, 06:50, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > > On Sep 1, 12:22 pm, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > On 1 Sep, 08:13, "[MVP]" <ban...(a)gmail.com> wrote: > > > > > > > > On Sep 1, 8:28 am, kevcar40 <kevca...(a)btinternet.com> wrote: > > > > > > > > > Hi > > > > > > > > i have the following code to check the spelling ot text entered into a > > > > > > > > text box > > > > > > > > it works fine > > > > > > > > however a message box appears saying Spelling check complete if there > > > > > > > > is no spelling error > > > > > > > > > If Len(Me!Reason & "") > 0 Then > > > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > > > Else > > > > > > > > Exit Sub > > > > > > > > End If > > > > > > > > > Is it possible to stop this message appearing if there is no spelling > > > > > > > > mistake > > > > > > > > > thanks > > > > > > > > > kevin > > > > > > > > Hi, > > > > > > > > Private Sub Text_AfterUpdate() > > > > > > > 'Call CheckSpelling(Me) > > > > > > > If Len(Me!text & "") > 0 Then > > > > > > > DoCmd.SetWarnings False > > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > > DoCmd.SetWarnings True > > > > > > > Else > > > > > > > Exit Sub > > > > > > > End If > > > > > > > End Sub > > > > > > > > However, this willspell-check all the fields/records. Better approach > > > > > > > is to use the following code - add tag property "SpellCheck" for field > > > > > > > (s) for which you want to runspellcheck: > > > > > > > > Private Sub Text_AfterUpdate() > > > > > > > Call CheckSpelling(Me) > > > > > > > End Sub > > > > > > > > Function CheckSpelling(ByRef frmFormName As Form) > > > > > > > Dim ctlControlName As Control > > > > > > > DoCmd.SetWarnings False > > > > > > > For Each ctlControlName In frmFormName > > > > > > > Select Case ctlControlName.ControlType > > > > > > > Case acTextBox > > > > > > > If Nz(ctlControlName, "") <> "" Then > > > > > > > If ctlControlName.Tag = "SpellCheck" Then > > > > > > > With ctlControlName > > > > > > > .SetFocus > > > > > > > .SelStart = 0 > > > > > > > .SelLength = Len(ctlControlName) > > > > > > > End With > > > > > > > DoCmd.RunCommand acCmdSpelling > > > > > > > End If > > > > > > > End If > > > > > > > End Select > > > > > > > Next ctlControlName > > > > > > > DoCmd.SetWarnings True > > > > > > > End Function > > > > > > > > Add spaces/tabs to code to have it readable. > > > > > > > > Regards, > > > > > > > Branislav Mihaljev > > > > > > > Microsoft Access MVP- Hide quoted text - > > > > > > > > - Show quoted text - > > > > > > > ok trying it now > > > > > > can you give me a little clarification please > > > > > > my form is called inhibitors > > > > > > the text box to check is called reason > > > > > > Do i need to change "ByRef frmFormName As Form" to "ByRef > > > > > > inhibitors As Form > > > > > > and all occurrances of frmFormname > > > > > > > and do i need to change ctlcontrolName to Me.reason > > > > > > > thanks again > > > > > > > kevin > > > > > > Hi, > > > > > > Open form in Design View, select field(s) for which you want to run > > > > >SpellCheck, open Properties window and find in the list property > > > > > "Tag". Write there "SpellCheck" (without quotes). > > > > > > In your case select field "reason", find in Property window event > > > > > AfterUpdate, select [Event Procedure] and click "...". Code should > > > > > look like this: > > > > > > Private Sub reason_AfterUpdate() > > > > > Call CheckSpelling(Me) > > > > > End Sub > > > > > > Add new module, copy above function (Function CheckSpelling) and save > > > > > it by name "modSpellCheck". While you are there - in VBA window, click > > > > > menu Debug > Compile to make sure there are no errors in code. > > > > > > Run form, try to enter text in field "reason" both without and with > > > > >spellerrors. It should pop-upspellcheckerwhen there is an error > > > > > only, without message "SpellCheck completed". > > > > > > Above approach will runSpellCheck for particular field only and for > > > > > the one record only - the one which got new value. > > > > > > Regards, > > > > > Branislav Mihaljev > > > > > Microsoft Access MVP- Hide quoted text - > > > > > > - Show quoted text - > > > > > thank you very much for your time- Hide quoted text - > > > > > - Show quoted text - > > > > i have followed your instruction > > > my Event procedure looks like the following > > > Private Sub Reason_AfterUpdate() > > > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > > > [Dates].Value > > > Call CheckSpelling(Me) > > > End Sub > > > > problem is if there is an incorrectly spelt word > > > i get the following error message > > > > "the macro or function set to the beforeupdate or validationRule > > > property for this field is preventing Microsoft Office Access from > > > saving the data in the field > > > > if this is a macro, open the macro in the macro window and reomve the > > > action that forces the save > > > if the macro includes a setvalue action, set the macro to Afterupdate > > > property of the control instead > > > if this is a function, redfine the function in the module window" > > > > This error pops up when change has been selected for the incorrectly > > > spelt word > > > > an ideas > > > > thank > > > > kevin > > > Hi, > > > What this does: > > > Forms![Block]![Block Inhibitors]![Text17].Value = Forms![Block]! > > [Dates].Value > > > ? > > > When you type in field "reason" some text doesspellcheck works or > > not? > > > Regards, > > Branislav- Hide quoted text - > > > - Show quoted text - > > when i type correct spellig in to reason text box > i get no problem > when i mis spell a word the spell checker pops upwhen i click change i > get the message > and when i close the form i get the same message Hi, This: Private Sub Text_AfterUpdate() Call CheckSpelling(Me) End Sub runs the spell check code only when text is updated, that is if you update text and close form without moving cursor to other field/ record, code will run. Regards, Branislav Mihaljev Microsoft Access MVP
|
Pages: 1 Prev: where can i download file OTKLOADR.msp? Next: Enter key to go to next record |