1. What built in object would you use to execute Macro
commands from VBA
code?
2. If you want to write your own custom validation
function for a control,
what event would you attach to this?
3. What form property would you set to write cached data
to the underlying
table?
4. What must you include in the declaration of an object
in order for it to
trigger events?
5. In VBA, is it possible to use a For Each ... next loop
with your own
collection class? Why?
>Please someone help! I am not getting any answers to these
>questions. Are they that tough?
Well yes, this far out of context, they can be tough. To
properly answer general questions like this requires far
more explanation than is appropriate in a newsgroup.
> Someone please help a newbie!
You might be a newbie to Access, but these are not newbie
programmer questions. They sound to me as if you are a
programmer from a different environment/mindset trying to
translate your knowledge to the ways of Access.
>1. What built in object would you use to execute Macro
>commands from VBA code?
The use of the word macro here might be ambiguous. If you
really mean Access Macros, then try DoCmd.RunMacro, but I've
never used it - most Access developers use far more
versatile VBA code for everything.
>2. If you want to write your own custom validation
>function for a control, what event would you attach to this?
Generally, you would use the BeforeUpdate event.
>3. What form property would you set to write cached data
>to the underlying table?
I don't know what you mean by "cached data". Form's
normally write a new or modified record's data to its table
whenever is appropriate - it's automatic. If you're doing
something out of the ordinary, then you'll have to explain
in detail before you can get a meaningful answer.
>4. What must you include in the declaration of an object
>in order for it to trigger events?
Wow, a newbie who's creating objects with events ;-)
This really is an advanced topic. In general user defined
class modules are about as close as you can get to true
objects and there's very little you can do to with regards
to events. You can create a module that sinks events from
form or report objects using the With Events statement, but
you'll have to check Help for all the ins and outs.
>5. In VBA, is it possible to use a For Each ... next loop
>with your own collection class? Why?
Yes, for a built in or user defined Collection object.
I don't think so for a class that manages a collection, but
there may or may not be a back door way around some of the
issues. If there is, it's beyond my experience.
--
Marsh
MVP [MS Access]
Again thank you for your response, but next time please
remember that there may be more than one reason why
someone may have questions they need answered besides
trying to advance on someone elses knowledge.
Sorry for the misspelled words but it is late and I dont
want to go back and correct them.
I am sure you all understand!>-----Original Message-----
>.
>
PLEASE DON'T MULTI-POST!
Multi-posting is posting the same question several times to different
newsgroups. The people who reply in one newsgroup, can not see any answers
given in other newsgroups. I just spent some time to answer your question in
the other newsgroup. I am NOT HAPPY to find that I have wasted my time,
because someone else has already answered it in THIS newsgroup!
Instead, please CROSS-POST. This means to post the question ONCE, putting
ALL of the desired newsgroups into thr Newsgroups: line. Then, a person
reading your question in one newsgroup, can see any answers that other
people have already given in the other newsgroups.
TC
"Mr. Miller" <cor...@yahoo.com> wrote in message
news:06ae01c35b08$9dbc5fa0$a601...@phx.gbl...
> Please someone help! I am not getting any answers to these
> questions. Are they that tough? Someone please help a
> newbie!
(snip)
I just said it looked like homework! :-)
As for the forums, there are some general rules which make it easier for
everyone. These cover issues such as, cross-posting versus multi-posting. If
you do a google search for "newsgroup netiquette" you will find tons of
information.
HTH,
TC
"TROY" <cor...@yahoo.com> wrote in message
news:88ef01c35b15$86b0f250$a001...@phx.gbl...