Macro recording in Access?

  • Thread starter Thread starter StargateFanFromWork
  • Start date Start date
S

StargateFanFromWork

I'm finding Access so fascinating. I'm understanding it so much more now
with this last year's tremendous experience in really working with Excel and
some vb coding I've learned to do, though still quite rudimentary. That's
the trouble I ran into today. I was trying to put a SORT ASCENDING button
into a form so that all our users could easily sort the records. But the
trick I usually use in Excel doesn't seem to exist in Access (?). I could
record a lot of events in Excel and that's how I've been learning a lot of
code. But we don't seem to have that function in Access (or it's hidden
(?)). How does one get simple code like "sort ascending", for example.
Where would we go to build simple events?

TIA.
 
Stargate, as an example, you can build a command button that runs a macro.
The macro runs a single ApplyFilter command that only shows you records that
meet certain criteria. For example, I have a field called Class on my form
that is a drop down list of values...Clients, Friends, etc. My ApplyFilter
condition might say "ClassID=5" or "ClassID=7" depending on which records I
want to show (whether it is just friends or just clients I want to see).
Does that help?

Destin Richter
(e-mail address removed)
 
StargateFanFromWork said:
I'm finding Access so fascinating. I'm understanding it so much more
now with this last year's tremendous experience in really working
with Excel and some vb coding I've learned to do, though still quite
rudimentary. That's the trouble I ran into today. I was trying to
put a SORT ASCENDING button into a form so that all our users could
easily sort the records. But the trick I usually use in Excel
doesn't seem to exist in Access (?). I could record a lot of events
in Excel and that's how I've been learning a lot of code. But we
don't seem to have that function in Access (or it's hidden (?)). How
does one get simple code like "sort ascending", for example. Where
would we go to build simple events?

TIA.

Access macros are different and there is no such "recorder". When we automate
stuff in Access it is not done by mimicking user keystrokes and mouse actions
anyway. The macros and VBA code can simply do those things without going
through the GUI.
 
Rick Brandt said:
Access macros are different and there is no such "recorder". When we automate
stuff in Access it is not done by mimicking user keystrokes and mouse
actions

Well, the neat thing about macro recording is that the resulting code usu.
wasn't the usual mimicking of keystrokes and mouse actions. I record that
type of thing in, say, AutoIt (a freeware scripting language whose keystroke
recording truly shows keystrokes vs when we script). Excel VB macro
recording substitutes keystrokes mimics with vba code. That is what is so
neat.
anyway. The macros and VBA code can simply do those things without going
through the GUI.

Oh yeah?? <g> I like the way you casually drop "simply" into the above
sentence <lol>. Pls tell me then, to "simply" be able to build my own
macros in Access without programming skills other than what I've picked up
along the way (pretty limited with regards to VB as it's complex to learn as
I'm doing it <g>) _without_ that recorder. I'd be very interested in
knowing how to do that as simply as recording <vbg>.

Thanks.
 
Destin Richter said:
Stargate, as an example, you can build a command button that runs a macro.

Yeah, the command button thing is easy (it's the rest that's going to be
tough I predict! said:
The macro runs a single ApplyFilter command that only shows you records that
meet certain criteria. For example, I have a field called Class on my form
that is a drop down list of values...Clients, Friends, etc. My ApplyFilter
condition might say "ClassID=5" or "ClassID=7" depending on which records I
want to show (whether it is just friends or just clients I want to see).
Does that help?

Well, theory always does, yes, thanks. But without the recorder, it's going
to be tough to know how Access translates these types of things. I mean, I
might be able to eventually figure out how to do the sort thing, but it's
going to be really nifty (_not_) to see how I'm going to manage everything
in Access without that recorder <sigh>. The trouble with the vb help file
is that you need to know what to search for and without the recorder giving
us clues on what Access VB calls things, I foresee challenges ahead. And I
thought Excel Vb was hard! <g>

Thanks much! I'll keep plugging away. Still can't afford any courses (but
I can still hope to one day manage it). :oD
 
StargateFanFromWork said:
Access macros are different and there is no such "recorder". When
we automate stuff in Access it is not done by mimicking user
keystrokes and mouse actions
anyway. The macros and VBA code can simply do those things without
going through the GUI.
[snip]
Oh yeah?? <g> I like the way you casually drop "simply" into the
above sentence <lol>. Pls tell me then, to "simply" be able to build
my own macros in Access without programming skills other than what
I've picked up along the way (pretty limited with regards to VB as
it's complex to learn as I'm doing it <g>) _without_ that recorder.
I'd be very interested in knowing how to do that as simply as
recording <vbg>.

I wasn't using "simply" to mean that it was simple to write the code or
macros. I just meant that in many cases the way to have Access
automatically do something has little correlation to how a user would do it
from the GUI and that programming with "what happens in the GUI" as your
starting point often results in doing things in a less than optimal manner.
 
Back
Top