Why double underscore after control name

Control name on form is "Kit #"

The afterupdate event that fires for this control calls the control
Kit__ as per following.
What is happening here?

Private Sub Kit___AfterUpdate()
ChangeKitBase Me.Kit__
End Sub
davjoh123 [ Di, 22 April 2008 07:07 ] [ ID #1947622 ]

Re: Why double underscore after control name

<davjoh123 [at] yahoo.com> wrote in message
news:1ea2dc43-2fbe-4921-8492-0f2099f7d1f2 [at] s33g2000pri.google groups.com...
> Control name on form is "Kit #"
>
> The afterupdate event that fires for this control calls the control
> Kit__ as per following.
> What is happening here?
>
> Private Sub Kit___AfterUpdate()
> ChangeKitBase Me.Kit__
> End Sub

The behaviour you are seeing is a consequence of using punctuation
characters in control names. Change the name of the control (plus any
references to it) and all will be well.
Stuart McCall [ Di, 22 April 2008 13:35 ] [ ID #1947633 ]

Re: Why double underscore after control name

"Stuart McCall" <smccall [at] myunrealbox.com> wrote in message
news:fukiin$ni0$1$8302bc10 [at] news.demon.co.uk...
> <davjoh123 [at] yahoo.com> wrote in message
> news:1ea2dc43-2fbe-4921-8492-0f2099f7d1f2 [at] s33g2000pri.google groups.com...
>> Control name on form is "Kit #"
>>
>> The afterupdate event that fires for this control calls the control
>> Kit__ as per following.
>> What is happening here?
>>
>> Private Sub Kit___AfterUpdate()
>> ChangeKitBase Me.Kit__
>> End Sub
>
> The behaviour you are seeing is a consequence of using punctuation
> characters in control names. Change the name of the control (plus any
> references to it) and all will be well.

I just realised I didn't actually answer your question. The reason Access
changes the name is because special characters aren't allowed in procedure
names.
Stuart McCall [ Di, 22 April 2008 14:10 ] [ ID #1947636 ]

Re: Why double underscore after control name

And the # is the character Access uses to delimit literal dates.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com
u28780 [ Di, 22 April 2008 18:42 ] [ ID #1947655 ]

Re: Why double underscore after control name

Linq Adams via AccessMonster.com wrote:

> And the # is the character Access uses to delimit literal dates.
>
You can concatenate "Display This#http://www.nowhere.com" to create a
hyperlink. I think it's a shame that the # character was used as people
may use the # sign to denote a number in the display part of the hyperlink.
Salad [ Mi, 23 April 2008 00:11 ] [ ID #1947663 ]
Datenbanken » comp.databases.ms-access » Why double underscore after control name

Vorheriges Thema: I added Date$ to a query field and am getting shaky results
Nächstes Thema: tracking changes...this is getting a little too confusing for me