Moving objects on form via code (1 Viewer)

Anauz

Registered User.
Local time
Today, 06:42
Joined
Nov 14, 2000
Messages
81
Hi


I have some buttons on a form which i want to move to differnet positions depending on who is logged on. ie some buttons will be hidden....some not. so i want to fill in the gaps of hidden butons. Any help will be appreciated


Thanx in advance
 

Chris RR

Registered User.
Local time
Today, 00:42
Joined
Mar 2, 2000
Messages
354
I think you want to look at the Left and Top properties in Access help.

Another option would be to put a graphic behind the buttons. Make the buttons go away, the user sees a nice picture...
 

Anauz

Registered User.
Local time
Today, 06:42
Joined
Nov 14, 2000
Messages
81
I'e used the left and top properties....but it seems to put the objects on the top left of the form
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 06:42
Joined
Jun 16, 2000
Messages
1,954
sounds like you set the left and top properties to zero or a low value.

One thing to remember when sizing/moving objects in code is that you have to pass it the value in 'Twips', not millimetres or whatever shows in your properties box for the object. there are 567 twips in a centimetre apparently, so even if you set the top and left properties to 100, the object would still be pretty much at the top left.

HTH

Mike
 

Atomic Shrimp

Humanoid lifeform
Local time
Today, 06:42
Joined
Jun 16, 2000
Messages
1,954
On your main question though, I always just set the buttons to enabled = false if the user isn't allowed them (or Visible = false if I think the user shouldn't even know about them.

presumably you have sets of functions that apply to each user; if you grouped these in rows so that the lowest level functions were on the top row and the highest level on the bottom row, you might be able to set visible = false for X number of rows depending on the userlevel) and then shorten your form so that it doesn't look empty.

Mike

[This message has been edited by Mike Gurman (edited 03-02-2001).]
 

Anauz

Registered User.
Local time
Today, 06:42
Joined
Nov 14, 2000
Messages
81
thanx Mike, i was doing it in mm, which was why it never worked

yes mike, i've hidden some buttons for user with low level access. But he buttons are grouped by category. do they are not arragned in any order.

But it works now thanx


[This message has been edited by Anauz (edited 03-02-2001).]
 

Users who are viewing this thread

Top Bottom