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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WindowTop and WindowLeft Properties Not Working

Status
Not open for further replies.

billschu

Technical User
Apr 3, 2001
38
US
Hi,

I am trying to use the WindowTop and WindowLeft property but I am getting an error message "Application defined or object defined error". This is what I got from MSDN (below) - seems pretty straightforward so I'm not sure what is going on. I doesn't say I need a special library or anything.

Thanks,
Bill

WindowTop Property
Returns an Integer indicating the screen position in twips of the top edge of a form or report relative to the top of the Microsoft Access window. Read-only.


expression.WindowTop


expression Required. An expression that returns one of the objects in the Applies To list.

Remarks
Use the Move method to change the position of a form or report.

Example
The following example returns the screen position of the top and left edges of the first form in the current project.

With Forms(0)

MsgBox "The form is " & .WindowLeft _
& " twips from the left edge of the Access window and " _
& .WindowTop _
& " twips from the top edge of the Access window."

End With

 
Any chance you could post your faulty code ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I am just trying this in the immediate / debug window to test:

?Forms("frmMain").WindowTop

while the form is open, and I get the error.
one other thing to note, when I type the "." the property does not show up in the list, just WindowWidth and WindowHeight.

Thanks,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top