Positing Form when Open

rohnds

Registered User.
Local time
Today, 11:40
Joined
Jul 20, 2010
Messages
19
I have small form that consist of nothing but a calendar. In the main form is a command button that opens this calendar form.

What I would like to do is position the calendar form at certain position respect to the main when it open. Can this anyway be done in MS Access (I am using 2007).
KRuV
 
You can play with the move size command and the Top / Left properties of the form you are basing if off.

For example you can use
Code:
DoCmd.OpenForm "FormNameHere"
Forms!FormNameHere.WindowLeft = Me.WindowLeft + Me.WindowWidth + 200
Forms!FormNameHere.WindowTop = Me.WindowTop - 100

Play with that to see what you can get.
 
I tried it. But I keep getting "Can't assign to read-only property" error msg.

What am I doing wrong?
 
You aren't doing anything wrong. I gave you bad code. I just went and tested and came up with GOOD code:

Code:
Dim frm As Form
DoCmd.OpenForm "YourFormNameHere"
Set frm = Forms!YourFormNameHere
frm.Move Me.WindowLeft + Me.WindowWidth + 200, Me.WindowTop
 

Users who are viewing this thread

Back
Top Bottom