Re: Access 2007 Technical Questions
- From: "Ronald Dodge" <ronald.dodge@xxxxxxxxxxxxxx>
- Date: Fri, 2 Jun 2006 13:14:13 -0400
See inline statements.
--
Ronald R. Dodge, Jr.
Production Statistician/Programmer
Master MOUS 2000
"'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@xxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:ujnLTRlhGHA.460@xxxxxxxxxxxxxxxxxxxxxxx
Hi, Ronald.
Most times, you want
the validation rules to run, but there are a minor few possible reasons
why
you may want to bypass the validation rules such as user clicking on the
"Help" command button (if there is one on the form
How are you invoking the online help? Remember, even though I may know the
different ways, I have users that don't know very much about computers and
only know what they see.
My validation rules don't run when I invoke online help. Please show your
code and describe what happens, and perhaps someone can help you on this
problem.
resetting the form
Use Me.Undo to reset the form.
or
even backing out of the form
Same deal here with backing out of the form. Yes, I knew about this, but I
have users that don't.
Hit the <ESC> key twice.and
However, when the user goes to click on a command button
on the form, all validation rules on the active control are processed,
focusif any of those validation rules causes the control to be in error, the
Enter Event doesn't even take place on the command button cause the
controlis
forced to stay on the active control rather than to transfer to the
command
button.
Have you tried putting your validation code in the active control's
OnBeforeUpdate( ) event? You can cancel the update, use a MsgBox to tell
the user about the problem, and the focus will remain on the active
whenever the value in the active control doesn't meet your criteria, suchas
when the user tries to leave a required text box empty.
You missed my point here. To illustrate my point, setup the following
example:
A text box
A command button
Within each of the events below on the textbox, put the code:
Msgbox "<Name of Event> event was triggered", 48
Such as
Private Sub tbxNAME_BeforeUpdate(Cancel as Integer)
Msgbox "BeforeUpdate event was triggered.", 48
End Sub
List of textbox events to put this in:
BeforeUpdate
AfterUpdate
Exit
I also use the Change Event as part of my validation process, but in this
example, the Change event won't be triggered. However, also put this same
code in the "Enter" event of the command button.
Within the Exit Event, set the Cancel property to "True" for the
illustrative purpose.
After you have done that, click into the textbox, then click on the command
button.
As you will notice, all of the events in the text box was gone through and
cause the cancel property was set to true in the Exit Event, the command
button never even got the focus, thus the messagebox doesn't even come up
for the command button.
andTo get around this issue, I had to mimic the CausesValidation Property
thisValidation Event as has been setup in VB6, which meant in order to get
around this issue, I had to UNBIND every single form and control else
newsgroups.wasn't going to work.
Wow. That would be the hard way to do it. Hitting that <ESC> key or
writing VBA code to validate the data, and canceling the update if any
problems are encountered, works for me.
It took me a total of 3 full months to do the R&D to
get around this issue.
Wow! You really should have posted some questions in the Access
We would have gotten you straightened out that same day, probably withinan
hour or two of your post.bunch
Initially, I was using DAO to get around the issue above as in order to
get
data to the any of the BE databases with all forms and controls unbound
Suit yourself if you want to use unbound forms, but that's the beauty of
bound forms in a RAD environment: the developer doesn't have to do a
of programming to provide data validation, maintain data integrity,prevent
record locking, et cetera.manipulate
can
only use ADO or DAO programming language to manipulate the data.
Well, database developers use a powerful programming language to
data. It's fast and reliable. It's called SQL. It's not a common needto
use DAO or ADO Recordset cursors, unless the data manipulation isall
exceptionally complex. I get the impression you're using cursors to do
your updates, not queries or bound forms.
I also use SQL quite extensively. However, there are cases that I need to
use other means on the recordset, and not only that, but one also needs to
know if the data behind the scene has changed, even if from a different
source, so that's the main reason why I need the dynamic cursor keyset to be
able to have the recordset to be able to see the changes (dbSeeChanges).
longer
However,
there were instances that I found, when the code initially put the
recordset
into Edit Mode, even with the variable set at the module level of the
form,
before it even reaches the Update Method, the EditMode property no
queries.has it's enum value that it suppose to have. This more or less has
rendered
DAO programming useless.
Why use a Recordset to edit data? Why aren't you using a query or a bound
form? If you used either of these, there would be no reason to check
whether the record was currently being edited, or the record was being
added, et cetera. If you use optimistic locking and there's a record lock
with a bound form, Access will let you know. Likewise with update
If there's a problem updating a record, Jet will let you know.
Well I already mentioned as to why with regards to bound forms. I would
love to use bound forms, but given the user friendliness issues, this option
was blown out of the water. I also know how the different locking methods
works, which I use record locking though optimistic or pessimistic is
dependent on the situation.
another
I get the impression that you are a programmer who is experienced in
field but has migrated to databases, where the solutions you come up withand
use code instead of the database engine's functionality. Using cursors
unbound forms are typical symptoms of a programmer with previousexperience
on non-data applications. If this is the case, then I recommend that youthe
either get training or find an experienced Access developer to show you
techniques we use for reliable RAD in Access.
Well I have used VBA quite extensively, but I also had a lot of exposure to
databases including taking tables to NF5 level, which many disagree with me
taking tables to that level, but there are cases for such things. Most DB
programmers will only go to the strict NF3 level, but for me, I take it all
the way out to NF5 level.
aIssue 3: ADO programming doesn't allow for DynamicCursor Keyset against
supposeJet Engine (Critical)
This one is actually documented, so I ask the question, how is one
needsto setup a recordset using a Jet Engine to be able to see changes within
it
when changes do take place?
It's somewhat rare that an update query is too complex to use SQL and
VBA to customize the query. If you're using cursors for recordin
adds/updates/deletes for more than about 5% of your queries, then you are
probably doing this the hard way.
Without this capacity, it has rendered ADO
programming useless.
DAO, the preferred data access library for Jet, allows one to see changes
the Recordset. The DAO library has been available for every version ofverify
Access since at least 2.0 (and possibly 1.0 and 1.1 too, but I can't
that). If you're using ADO on a Jet database, it's because ADO providesfor
some functionality you need that DAO doesn't. dbSeeChanges isn't one of
them.
Does Access 2007 address this issue?
Access 2007 provides bound fields, and allows queries instead of cursors
updating data, and also has dbSeeChanges in the DAO library. The ADO 2.8
library doesn't have dbSeeChanges, so it's not the library you're going to
be using if you absolutely must use a cursor to update records.
These things has been in Access long before 2007, so I don't think you see
the same issues that I see.
single
it's the above 3 issues that has more or
less turned me against from using Access as with those issues above,
Access
is not a worthy DB program for a multiple user environment.
Access is a multiuser database, so it works great in a multiuser
environment, provided the database application was not designed for a
user environment instead, which is a very common mistake withinexperienced
developers.
This is the very reason why I instantly start out developing for multiple
user environment, but given the issues that I have ran into, which I have
already stated in this thread mostly, but the size limitation of the DB
files is another one that I don't like, but got around that one as well.
the
I was going to
have my own financial stuff stored within Access, and then allow my wife
some capacity to record some things, but with the issues above, it's not
stable enough to have something like that setup.
First, don't store data in an Access database if it needs to be secured.
Second, if you find that Access isn't stable, then either Access isn't
installed correctly, or hasn't had all of the service packs applied, or
developer hasn't designed the database application correctly. What
instability issues or errors are you experiencing?
When I mentioned about it being unstable, I was really refering more so to
the fact that the issues that I been having to deal with, which makes it not
so user friendly. As far as the application itself is considered, it
doens't crash or anything of that nature. It's just that I'm a stickler on
both user friendliness and strict data validations, but given how Access is,
I can only have one or the other, thus why I still won't lay claim to it
being multi-user worthy. Now, if MS puts in the CausesValidation and
Validation Event within Access, then that may change my claim, as that seems
to be the root of 90% of my issues in Access. That doesn't mean a lot of
these other issues isn't in Access, but I would be able to bypass them and
it would greatly reduce my development time. I probably would be able to
develop about 10 times faster, as in that cause, I wouldn't have to worry
all that much about the communication aspect. All I would have to do is
develop the form and put in validation checks within the events. I also
would be able to more utilize the form level events as they were meant to be
used rather than this long way round about way cause of this issue.
has
Instead, I am still using
Excel for all of my financial planning and tracking stuff, which that
filesgotten to be so large, I have already broken that 1 file down into 4
and it's about to get split out to a 5th file
Wow! That's doing it the hard way. How do you prevent duplicate entries?
How do you prevent insertion anomolies? How do you prevent deletion
anomolies? How do you prevent redundancy between the multiple files? How
do you do data validation? Answer to all of the above: you don't. I'd
recommend storing that data in a relational database, not a bunch of
spreadsheets.
The way it's done in spread*** is so vastly different as compared to how
it would be done in a DB evironment. It is the long hard way, yes, but
given the issues, I won't put it in Access, at least not until at the very
least, the root issue is fixed.
a
Issue 4: Listbox properties doesn't update until it has lost focus
That's how this control is designed to work.
records wouldn't be updated properly. To get around this issue, I<SNIP>
had to create a class module
Of course, this meant that I had to learn every single behavior of the
listbox from using both methods, mouse and keyboard.
It's not a bad idea to learn the tool you are using, but you seem to write
lot of unnecessary code to "get around issues." Have you tried a timer
event, so that you can read the list box's properties with VBA code almost
immediately after the list box has lost focus?
I need to have the capacity to be able to read the data before the listbox
loses the focus. By the time it loses the focus, all of the needed stuff
has already been done in most cases. I have other things in most cases
being modified on the form such as enabling and disabling command buttons.
If a command button is disabled and needs to be enabled, can't do that while
the control has the focus, thus can't click on the command button or even
activate it via the command button's accellerated character (if it has one)
without having to go through's the listbox's KeyDown Event. This issue is
actually separate from the main problem.
There's also one other reason. In the production environment, in one case,
wanted to be able to drag and drop the different work orders within the
listbox, and here's what I found and documented. Bear in mind, I am using a
Class Module to store and manipulate the listbox, which the class is
initiated at the time the form is loaded.
List Box Drag and Drop Feature
Operations by Mouse
Left mouse button is used for the following things:
Just clicking on selects an item and deselects all other items. However,
this is only true, if clicking on an item that has not been highlighted.
Click on and hold down on an item does one of 2 things depending on if the
item is highlighted or not.
If item is highlighted, the selected items can be dragged up or
down within it's boundaries.
If item is not highlighted, can selected a range of items in one
go.
Can use the "Shift" key with the mouse to select a range of items
Can use the "Ctrl" key to select/deselect individual items without impacting
other items.
Operations by Keyboard
Arrow Key up and down selects only a single item
Shift Arrow up and down selects a range of items starting with the first
item that the shift key was pressed on
Ctrl Arrow Up goes to the first item in the list while Ctrl Arrow Down goes
to the last item in the list with all other items deselected.
Alt + Arrow Up/Down drags the selected items up/down the list while kept
within it's boundaries.
Known Issues
ITEMS DOESN'T SEEM TO DRAG PROPERLY
This issue is known cause of the many tests that has been done, but given
the nature of this issue not occurring on a regular basis, it's cause has
yet to be determined. At this time, if it causes an item to not be
selecting properly, you will need to back out of the form, and then go back
into the form.
SHIFT KEY DOESN'T SEEM TO BE WORKING WITH KEYBOARD METHOD
If you select multiple items via "Ctrl" key and the mouse, then hold down
the Shift key and use either the up arrow or the down arrow, it will work
once, but try it a second time in a row, it fails. Even in one case in
particular, it has caused the item to not highlight properly until you cause
another form or application to come to the front of the screen and hide the
form that the list box is on, which then when you bring the form back up
that has the listbox on it, it then shows the items all selected as
expected.
Steps to recreate this behavior
Create a test form
Add a Listbox to it
Set the RowSourceType as Value List
Set Multi Select to Extended
Set RowSource =
Test1;Test2;Test3;Test4;Test5;Test6;Test7;Test8;Test9;Test10;Test11;Test12
Set ColumnCount = 1
Now close out the Property dialog box, if you have it open.
Goto Form (Run-time) mode
Click and hold the Left mouse button down on "Test4" item
As holding down the left mouse button, drag the mouse to "Test7" item
Left up on the mouse left button
Press and hold the "Ctrl" key (either one, doesn't matter)
Now single click and left up with the left mouse button on "Test8" item
Lift up on the "Ctrl" key
Hold down the "Shift" key (either one, doesn't matter)
Press and release the "Up Arrow" key.
out
Not only that, but I
found in few circumstances with the right combination of the keyboard
and/or
mouse actions on the listbox, the listbox itself freezes up and does
nothing
else, which the only way to get away from that issue has been to back
itof
the form, and then go back into the form.
I've never seen this behavior in any version of Access, so I can't comment
on it.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
"Ronald Dodge" <ronald.dodge@xxxxxxxxxxxxxx> wrote in message
news:ewga27jhGHA.1612@xxxxxxxxxxxxxxxxxxxxxxx
I have exerted a lot of energy in the past testing things out in Access
2000/2002/2003, and here's the issues that I have faced.
Issue 1: Error checking isn't user friendly (Very Critical)
The biggest issue that is the very reason why I have had so many other
issues in Access is the fact that Access is not very user friendly when
wantcomes to error checking, especially for mouse users. Most times, you
andthe validation rules to run, but there are a minor few possible reasons
why
you may want to bypass the validation rules such as user clicking on the
"Help" command button (if there is one on the form), resetting the form,
or
even backing out of the form as 3 possible reasons why to bypass the
validation rules. However, when the user goes to click on a command
button
on the form, all validation rules on the active control are processed,
focusif any of those validation rules causes the control to be in error, the
Enter Event doesn't even take place on the command button cause the
andis
forced to stay on the active control rather than to transfer to the
command
button.
To get around this issue, I had to mimic the CausesValidation Property
thisValidation Event as has been setup in VB6, which meant in order to get
around this issue, I had to UNBIND every single form and control else
apparentwasn't going to work. It took me a total of 3 full months to do the R&D
to
get around this issue. Therefore, I ask, "Does Access 2007 have the
CausesValidation Property and Validation Event, that is comparable to
VB6's
property and event?"
Issue 2: EditMode within DAO programming loses it's value for no
However,reason (Critical)
Initially, I was using DAO to get around the issue above as in order to
get
data to the any of the BE databases with all forms and controls unbound,
can
only use ADO or DAO programming language to manipulate the data.
longerthere were instances that I found, when the code initially put the
recordset
into Edit Mode, even with the variable set at the module level of the
form,
before it even reaches the Update Method, the EditMode property no
ahas it's enum value that it suppose to have. This more or less has
rendered
DAO programming useless.
Issue 3: ADO programming doesn't allow for DynamicCursor Keyset against
supposeJet Engine (Critical)
This one is actually documented, so I ask the question, how is one
orto setup a recordset using a Jet Engine to be able to see changes within
it
when changes do take place? Without this capacity, it has rendered ADO
programming useless. Does Access 2007 address this issue?
There is a 4th issue as well, but it's the above 3 issues that has more
hasless turned me against from using Access as with those issues above,
Access
is not a worthy DB program for a multiple user environment. I was going
to
have my own financial stuff stored within Access, and then allow my wife
some capacity to record some things, but with the issues above, it's not
stable enough to have something like that setup. Instead, I am still
using
Excel for all of my financial planning and tracking stuff, which that
filesgotten to be so large, I have already broken that 1 file down into 4
theand it's about to get split out to a 5th file with the data grouped in
thatfollowing categories:
Economy (This contains information about the economy including economic
historic data, which impacts inflation, thus also impacts the spending
side
of the equation)
Debt
History (Our own financial history)
Investments (This isn't actually broken out yet, but it soon will be)
Planning and Summary (This file pretty much contains everything else
Idoesn't fit into any of the above categories and currently also contains
the
investments)
Issue 4: Listbox properties doesn't update until it has lost focus when
it's allowed to have multiple selections (Moderate)
This issue caused a lot of problems for me as well. Without addressing
this
issue, records wouldn't be updated properly. To get around this issue,
behad to create a class module and put in a set of codes to more or less
dataable to record all of the various behaviors, just so as I can get an
accurate picture of what's taking place with the listbox. All of the
things
done to the listbox is retained, but it's properties are either not
updated
or if they are, the properties are only returning their old values,
similar
to what happens when a DB transaction is taken place by recording, but
prior
to those transactions to being committed, they are only in a temporary
storage, but once committed, the tables are updated with the recorded
Ifrom the transaction.
Of course, this meant that I had to learn every single behavior of the
listbox from using both methods, mouse and keyboard. Not only that, but
outfound in few circumstances with the right combination of the keyboard
and/or
mouse actions on the listbox, the listbox itself freezes up and does
nothing
else, which the only way to get away from that issue has been to back
of
the form, and then go back into the form.
Sincerely,
--
Ronald R. Dodge, Jr.
Production Statistician/Programmer
Master MOUS 2000
.
- Follow-Ups:
- Re: Access 2007 Technical Questions
- From: John Nurick
- Re: Access 2007 Technical Questions
- From: '69 Camaro
- Re: Access 2007 Technical Questions
- References:
- Access 2007 Technical Questions
- From: Ronald Dodge
- Re: Access 2007 Technical Questions
- From: '69 Camaro
- Access 2007 Technical Questions
- Prev by Date: RE: Data Validation - no symbols ( & % " ' *)
- Next by Date: Re: Access 2007 Technical Questions
- Previous by thread: Re: Access 2007 Technical Questions
- Next by thread: Re: Access 2007 Technical Questions
- Index(es):