Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cut and paste 1

Status
Not open for further replies.

merlin72

Programmer
Apr 18, 2000
50
US
I have 8 boxes( fields) on my form. I would like to do a cut and paste with the click of the mouse.
A person would click on a field and the background would change indicating that it was selected. Then when they click on another blank field it would move to that field.
Regards
Jim.


 
yes you can do it... i just did a simple mock-up.

you just need to play with the onClick events. you'll have to do some of your own housekeeping (a pain) but it's straightforward in practice

the following was a quick & dirty test but you should get the idea.

'global vars
Dim buffFlag As Boolean
Dim oldBg As Variant

Private Sub fDate_Click()
buffFlag = True
oldBg = Me.fDate.BackColor
Me.fDate.BackColor = RGB(255, 0, 0)
End Sub

Private Sub tDate_Click()
If buffFlag Then
Me.tDate = Me.fDate
Me.fDate.BackColor = oldBg
buffFlag = False
End If
End Sub

btw: i like the idea & i'll use it in my app :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top