Repositioning buttons bu user ?

etsoft

Registered User.
Local time
Today, 22:42
Joined
Nov 14, 2003
Messages
15
Hello,

i want the user to be able to reposition the buttons on a form.
So far i was able to do it with one button, the user presses the button and clicks on its new position. The position is written into a table which is being read when the forms opens. This works fine.

Here is the code

Private Sub Details_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Tafel1.Left = X
Me.Tafel1.top = Y
End Sub


Private Sub Form_Open(Cancel As Integer)
Me.Tafel1.Left = DLookup("
", "positie", "[knop] = 1")
Me.Tafel1.top = DLookup("[top]", "positie", "[knop] = 1")
End Sub

Private Sub Knop14_Click()
Dim dbs As Database
Dim rcs As Recordset

Set dbs = CurrentDb
Set rcs = dbs.OpenRecordset("positie")


rcs.Edit
rcs!Left = Me.Tafel1.Left
rcs!top = Me.Tafel1.top

rcs.Update
rcs.Close
Set rec = Nothing
Set dbs = Nothing

End Sub

I want to do it with several buttons on the screen.

I've tried a number of things but no luck so far, does anyone knwo how to do it ??

Thanks in advance.​
 

Users who are viewing this thread

Back
Top Bottom