ACCWIZ.DLL (Access Wizard Control Library)

R

Ronald Dodge

Is there any sort of written material that helps explain
how to use this Access Wizard Control Library, which
contains the FieldList object?

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
 
S

Stephen Lebans

There was an article written by Mike Gilbert in I believe an edition of
Smart Access several years ago. THis is the only written docs I have
ever seen. The Web address for this article is stated in the docs for my
code which you downloaded.
' Developed from original code/concepts
' by Michael T. Gilbert for Smart Access, Pinnacle Publishing
'
http://www.pinnaclepublishing.com/SA/SAmag.nsf/0/D9D1078A09E2A7748725688
5002D927D

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
R

Ronald Dodge

Thank you for pointing me to it. I have read the articles and it didn't
really help me out too much. Main thing, I haven't been able to play with
it too much, so I can't really speak, but given the fact that I have tried
to create it to no avail, even after running the registry file and
rebooting, I have at this point of time decided to go back to the ListBox
Object and see about using the X,Y coordinates of the object in the
MouseDown, MouseMove, and MouseUp Events. Even after aligning the
coordinates to what I see on my system, would these necessarily same
coordinates hold true on other systems which may have different screen
resolutions? That's one of my concerns about doing it this away at present
time, which leads me to the question, is there a way to measure controls in
twips during run time?
 
S

Stephen Lebans

What exactly are you tring to accomplish Ronald? I really have no idea
what part of the Access GUI you need to modify.

Yes there is no problem to measure controls/wiondow dimensions at
runtime. A lot of the projects on my site contain routines to convert
pixels to Twips. Have a look at say the TextWidthHeight sample mdb.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
L

Larry Linson

As you may have picked up along
the way, I am attempting to make
my forms as user friendly as possible
while at the same time adhering to
tight data validation checks, which
is one reason why I can't use bound
forms given how events works with
bound forms as opposed to unbound
forms. The idea is not only make it
user friendly for keyboard users,
but also for mouse users.

Your idea of "user friendly" or "tight data validation" may be quite
different than mine, but I have used Access since Version 1 and the only
unbound forms I've _had to_ use were for "control" purposes* or form that
had been written by someone else, in a database I was maintaining and didn't
have permission to change. I've just never had to use an unbound form for
data.

Now, early in my use of access, I _thought_ I needed unbound forms and
created some from time to time. But later I had invested the necessary time
and energy to understand how Access does work with bound forms, and realized
that I could have accomplished the same purposes with bound forms, much
easier.

* by "control purposes", I mean switchboard forms
that don't "handle data" or forms for choosing
criteria for opening another form or a report.

And, I flatter myself to think, as my clients seemed to think, that my
Access databases and Access clients to server databases were user-friendly
and included adequate data validation. In regards to the latter, it is often
possible to allow the user to _choose_ data rather than enter it, and reduce
the effort that has to be invested in validating that data.

Larry Linson
Microsoft Access MVP
 
R

Ronald Dodge

Okay, tell me then how can you setup a bound form to allow
a user to click on a command button without first
triggering the data validation checks in the previous
control?

Normally, you do want data validation checks to take
place, but there are few minor exceptions to the rule as
it depends on what the command button is setup to do. In
order for me to be able to set this up, I had to first,
setup something that would act much like the
CausesValidation Property and the Validate Event that VB6
has. That means, I had to use the Exit Event to setup the
control that's to be validated and setup the Enter Event
for the control(s) of when you want validation to take
place. For those minor few instances that you wouldn't
want the validation check to take place, you simply don't
setup the Enter Event for that purpose. The third thing I
had to do, I had to use the Public statement to have the
control validation code in place, which then use a
centralized code to execute the validation checks. I used
the CallByName function within the centralized code to
execute the specific control's validation check. If this
check passed, the focus would remain at the control that
had recieved the focus from the previous control that just
checked, and if it failed, it would return the focus to
the previous control (the control that was just checked).

Maybe a clearer picture

Control A has focus

User enters info into Control A

As Focus leaves Control A, code gets the necessary
information to be able to run the validation check on it
provided the Exit Event is setup. Note, there is no
actual validation taking place at this point of time.

Control B's Enter Event triggers, and if it's setup to
validate previous control, which acts much like the
CausesValidation Property in VB6, the Centralized
Validation Check command is triggered.

Centralized command get Control A's name, then uses the
CallByName function to trigger it's Validate code provided
that code is setup. All Validate codes are setup as
functions so as they can return either true or false. If
there is no macro by the name it's expecting, it will
assume that it passed anyhow. If the centralized Validate
gets a true or no macro response, then control B keeps
it's focus, but if the centralized Validate code gets a
false response, the focus is returned to Control A with a
message on the form stating why (which is done within the
control's Validate code).

Given that's how my code works for validation purposes,
and if I recall correctly, Access's error checking and
updating the field (and potentially the record, if it's
the last field of the record) is done between the
BeforeUpdate and AfterUpdate events on the control when
it's on a bound form. For that reason along with what I
had to do to get around the issue (making the forms more
user friendly for mouse users as otherwise, in the few
minor instances, it will only give them headaches), that's
why bound forms don't work for me.

Summary:

All events of the previous control are triggered before
the Enter Event on the next control is even triggered.
For Keyboard users, this could be handled via the KeyDown,
KeyPress, and KeyUp events, but for mouse users, the only
thing that would be getting the mouse event is the control
they click on, but if the previous control cancels the
updating/exiting, the control that the mouse was clicked
on, it's Enter event will not get triggered cause it won't
have the chance to get the focus. In most cases, this is
fine, but for those controls that deals with such actions
that you don't want the same validation checks to take
place on the control that's losing it's focus, like either
resetting the form or backing out of the form, this is
where bound forms fails.

Hope this gives you why I stated as I did. Maybe, just
maybe, I require higher standards on both sides (user
friendly and data validation) than other developers. A
lot of this comes from the fact I have been on the other
side of the data entry in the past, including the fast
pace required working as a Data Transcriber at the IRS
(minimal speed for ALPHA-NUMERIC, 7000 keystrokes per hour
which involves a lot of switching back and forth between
the qwerty keyboard and the numpad). Some things I liked
how it was done, other things, I didn't. As time went
along and my computer skills continued to develop on my
own, since I had done it as a hobby prior to it becoming
professionally, I got into validating data, creating and
running reports from that data. Now I'm in the position
to look at how we are entering the information, what can
we do to improve on the quality of that data while at the
same time, making it more user friendly without the system
taking too much time.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top