if I change ! to . and mmm# to mmm_ the code works
why?
well, special characters in field and object names are a real problem when
you're writing VBA code, as you've discovered. personally, i make a point of
never using anything except alpha characters and underscores in *anything* i
name in a database. using brackets around a "strange" name might work in
VBA, like [mmm#] - it works with names that have spaces, like [My Name], but
not necessarily with special characters.
as for the dot vs bang: i usually use dot for object properties, like
MyForm.Tag or MyControl.ForeColor; and bang for controls, like Me!MyControl
or Me!MyCommandButton. i've read explanations of the fine points in the
differences, and they do seem to be pretty fine points, at least most of the
time. generally, i go with my standards mentioned above, and if dot doesn't
work in a particular situation, i try bang - and vice versa.
there was a good explanation of dot vs bang posted by someone just recently,
in one of these Access newsgroups. if you're interested, suggest you try
searching Google Groups, in microsoft.public.access.*, and maybe with "dot"
and "bang" keywords, and see what you come up with.
hth
> if I change ! to . and mmm# to mmm_ the code works
>
[quoted text clipped - 49 lines]
> > > > >
> > > > > ?