Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

Inspecting values on a form as they change...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hzgt9b@nopost.com - 25 Oct 2005 18:06 GMT
I have a form bound to a table...
As changes are made to a field on the form, I want to inspect the change and
perform some action...
The problem that I am running into is that when I inspect the value using
the "On CHange" event, the data that is returned to me is not what was typed
into the form... it is missing the change (the character) that was just typed.

Specifics:
Here's what I've got.. a table named Config. Attributes: ID, Key, Value,
Description.
My form allows the user to make changes to the Value attribute... but When I
inspect the me.Value property, the value returned doesn't contain the last
character typed into the Value field...

Any help would be appreciated...
Ofer - 25 Oct 2005 18:19 GMT
Why aren't you using the before update event of the field, to check the full
value entered in the field.
With the possibility to cancel the entry by running the code
cancel = true

Signature

If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

> I have a form bound to a table...
> As changes are made to a field on the form, I want to inspect the change and
[quoted text clipped - 11 lines]
>
> Any help would be appreciated...
hzgt9b@nopost.com - 25 Oct 2005 18:30 GMT
From what I gather from my testing, Before update is only triggered as the
entire record looses focus... I can't wait until the user selects another
record before inspecting changes...

> Why aren't you using the before update event of the field, to check the full
> value entered in the field.
[quoted text clipped - 16 lines]
> >
> > Any help would be appreciated...
lwells - 25 Oct 2005 18:22 GMT
Have a look at the .Text property rather than the .Value in On Change Event.

The .Value is after the record has been updated.  The .Text will display
what was currently typed into the control before it is updated.

lwells

> I have a form bound to a table...
> As changes are made to a field on the form, I want to inspect the change and
[quoted text clipped - 11 lines]
>
> Any help would be appreciated...
hzgt9b@nopost.com - 25 Oct 2005 18:36 GMT
That worked for me... but it brings up another question for me...

WHen I inspect the value for the "Key" field, I say: Me.key, but Me.Key.Text
is not defined.... why does this attribute not have a text propoerty and but
the "Value" attribute have a text property. i.e. Me.Value.Text returns the
correct string...

> Have a look at the .Text property rather than the .Value in On Change Event.
>
[quoted text clipped - 18 lines]
> >
> > Any help would be appreciated...
lwells - 25 Oct 2005 18:49 GMT
Is the name of your control on your form actually "Key"?  Make sure you are
using the actual name of the control.

> That worked for me... but it brings up another question for me...
>
[quoted text clipped - 25 lines]
> > >
> > > Any help would be appreciated...
hzgt9b@nopost.com - 25 Oct 2005 19:06 GMT
Yep - the name of the control is the same name as the attribute on the
underlying table... attribute name=Key, control name=Key - same with Value
attribute, etc.

> Is the name of your control on your form actually "Key"?  Make sure you are
> using the actual name of the control.
[quoted text clipped - 28 lines]
> > > >
> > > > Any help would be appreciated...
lwells - 25 Oct 2005 20:08 GMT
And does Me.[Key].Text not work?

> Yep - the name of the control is the same name as the attribute on the
> underlying table... attribute name=Key, control name=Key - same with Value
[quoted text clipped - 32 lines]
> > > > >
> > > > > Any help would be appreciated...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.