RE: Drag and Drop Switch



Thanks for your reply.
I didnt know there was a function .OldValue in Access.

"'69 Camaro" wrote:

> Hi, Joel.
>
> > I have Drag and Drop working for my forms, but is there a way to switch the
> > values in the 2 textboxes when you drop n drag?
>
> No. However, two bound text box values could be swapped with each other as
> the result of an event, such as a button being selected. For example:
>
> Private Sub SwapBtn_Click()
>
> On Error GoTo ErrHandler
>
> Me!txtOne.Value = Me!txtTwo.Value
> Me!txtTwo.Value = Me!txtOne.OldValue
>
> Exit Sub
>
> ErrHandler:
>
> MsgBox "Error in SwapBtn_Click( )." & vbCrLf & vbCrLf & _
> "Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
> Err.Clear
>
> End Sub
>
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips.
>
> (Please remove ZERO_SPAM from my reply E-mail address so that a message will
> be forwarded to me.)
> - - -
> If my answer has helped you, please sign in and answer yes to the question
> "Did this post answer your question?" at the bottom of the message, which
> adds your question and the answers to the database of answers. Remember that
> questions answered the quickest are often from those who have a history of
> rewarding the contributors who have taken the time to answer questions
> correctly.
>
>
> "Joel" wrote:
>
> > I have Drag and Drop working for my forms, but is there a way to switch the
> > values in the 2 textboxes when you drop n drag?
> >
> > EX:
> >
> > tbOne = 1 tbTwo = 2 after drag and drop from tbTwo to tbOne would normaly
> > be tbOne = 2 and tbTwo = 2.
> >
> > I would like it to do this;
> >
> > tbOne =1 tbTwo =2 after drag and drop from tbTwo to tbOne
> > tbOne -2 and tbTwo = 1
> >
> > Thanks!
.