Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 8th, 2003, 02:24 PM
Snowsride Snowsride is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 79 Snowsride User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 53 sec
Reputation Power: 5
Compare opening and closing values

I have a form with an unbound text box that is populated with a value by a procedure. If the user overtypes the value in the text box with a new value I want this to trigger an event.

The On Change event does not work because it only detects if an entry is made, not if the entry value differs from the original value, and although the user shouldn't overtype with the same value it's possible they could get focus on the control in error. So I need some code to record the opening value of the control so that it can be compared with the After Update value.

I have tried assigning the opening value to a variable with the On Got Focus event and then referring to the variable in the After Update event but it is not recognised. I suspect it is something to do with the scope of the variable i.e. how do I use the value of a variable created in one procedure in another?

Any ideas/solutions appreciated.

Mike Collard

Reply With Quote
  #2  
Old October 24th, 2003, 12:06 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 12
You will need to declare a Public variable on the from, for the orignal value you are capturing with gotfocus. The you will be able to compare the public variable with what is now in the text box with the afterupdate

Use Public variables sparingly

s-

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Compare opening and closing values


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway