J
Jimmy
I'd like to thank you all for taking the time to help. But you didn't, so I
can't.
thanks for nothing.
can't.
thanks for nothing.
Jimmy said:I'd like to thank you all for taking the time to help. But you didn't, so I
can't.
Nick Coe (UK) said:I couldn't figure it out. What's the answer?
MikeB said:I think my response to the OP's original Q in the Thread in which it was asked
(which BTW is where this thread belongs besides being impolite) may be the
answer...
Jimmy said:well, i'm going to bed.
this is what i've got so far on the public sub
in addition to the code below i''ve tried a couple of different ways of
writing the with command... but no luck... if i could just get the name of
the field to the with input...
Private Sub French_word_Exit(Cancel As Integer)
Dim fieldname As String
spellcheck (Me.French_Word)
'spellcheck(me.French_Word)
'spellcheck(me.French_Word.name)
End Sub
Public Sub spellcheck(FieldName)
'It runs when the text box has data
With Fieldname
.SetFocus
.SelStart = 0
.SelLength = Len(FieldName)
End With
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
End Sub
You're getting mixed up between the control object and its
Name property. Let's use the object approach:
Jimmy said:You're getting mixed up between the control object and its
Name property. Let's use the object approach:
<- gets blank stare
um... i hate it when i do that?
anyway, still no workie workie... i notice that its passing the value
"donner" (french word for "to give") which means its passing the value not
the name of the field... but i think you're saying that i shouldn't have
been passing the name of the field anyway... and you don't seem to be using
it that way.
in many unix scripting languages you can pass a command to the OS, if this
were sh, i'd just do something like this
GDctl = me.french_word
with 'print GDctl'
dostuff
end with
can i do anything like that?
Dan Artuso said:Hi,
Remove the brackets:
spellcheck Me.French_Word
this will pass the object to your sub
or you can do this:
Call spellcheck (Me.French_Word)
Jimmy said:thanks dan, it seems to have worked, i still have to write the subs for the
other 40 fields, but that should work great!
marshal, i think your
If IsNull(ctl) Then Exit Sub
would have fixed my original problem if i'd kept all the private subs, and
it should prevent the problem from comming up with the public sub.
all in all, i was too hard on y'all. Thank you so much you were a great
help... i'll let you know if it all works![]()