Solved

How to Write a Program to Type Over a TextBox?

Posted on 2002-03-30
6
179 Views
Last Modified: 2010-05-02
I have been asked to write a program to type over a textbox .......To explain:
1>USER 1 Keys  in some data into the textbox,data gets stored into a database.
2>Since the data is Mission Critical I am required to:
  Display the previously entered data into textbox by
  User 1 as a shadow.  User 2 should be able to type over this and if there is a mismatch between User'1 n's data and User'2s data then a MsgBox should be displayed.  
Is this Possible?
(I have been told that this is the DeFacto Industry standard for Mission Critical DataEntry(Called as Shadow DataEntry or Double-Entry)is there any other method Pls.
Suggest)
0
Comment
Question by:soft_ware
6 Comments
 
LVL 6

Expert Comment

by:JonFish85
ID: 6908487
You mean something like this?

If User1Text <> User2Text Then
  MsgBox "User1's text is not the same as User2's!"
End If

Please let me know if I am on the right track...
0
 

Expert Comment

by:JimmieToo
ID: 6910203
soft_ware:

I assume by 'shadow', that User 1's text in not visible to User 2.  That would only make sense.

So, when the User 1 data is stored in the db, it is also stored in a string variable, say sUser1Entry and is cleared from the textbox.  When User 2 makes his entry, he might click on a 'Confirm' button or just press Enter.  At this time, his entry is sored in a string variable sUser2Entry and cleared from the textbox.  Now the comparison between sUser1Entry and sUser2Entry is made as suggested by JonFish above.

Jim  
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 15 total points
ID: 6910456
One way to address this is by tracking everything in the change event, where you can check keystroke-by-keystroke.  The problem with this is trying to deal with corrections while typing.

Probably a better way is to put something like JonFish85's code in the Validate event procedure:

Private sub Text1_Validate(Cancel as boolean)
   If User1Text <> User2Text Then
     msgbox "text does not match database", vbokonly
     Cancel = true
   End If
end sub
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Expert Comment

by:mmonacel
ID: 6916224
you may want to take the approach of having the previous user's entry appear in another color (red let's say) when the textbox pops up.  then as user2 types in the box, each character "typed over" turns a different color - say green - while the remaining characters are still red.  During this process or at the end, do your validation scheme.
0
 
LVL 16

Expert Comment

by:twalgrave
ID: 7754898
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to rspahitz
Please leave any comments here within the
next seven days.
0
 

Expert Comment

by:SpideyMod
ID: 7811935
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 68
Write data from SQL to CSV file - position 1 61
Add and format columns in vb6 7 57
Advice in Xamarin 21 80
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question