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

FORM SIZE

Status
Not open for further replies.

maeling

Technical User
Sep 23, 2002
109
GB
I have created my forms on a PC using a screen resolution of 1024x768. I know need to convert my forms to accomodate a screen resolution of 800x600. Is their a quick way of doing this ?
 
This is a "wild" attempt at accomplishing what you want... FIRST thing to do is MAKE A COPY OF YOUR DATABASE... OR use on a Test Database ! ! ! ! ! !

then create a Form with a command button, add this code, just change the name "frmDownSize" to the name of the form you create to perform this... then look at the results.. this code reduces the control sizes by 1/3. You might be able to use something similar to this.


Dim frm As Form
Dim ctl As Control
Dim db As DAO.Database, rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("MsysObjects")
With rst
.MoveFirst
Do While Not .EOF
If rst!Type = -32768 Then

If rst!Name <> &quot;frmDownSize&quot; Then

DoCmd.OpenForm rst!Name, acDesign, , , , acHidden
Set frm = Forms(rst!Name)
For Each ctl In frm.Controls
With ctl
.Height = .Height * 0.666
.Width = .Width * 0.666
If .Left <> 0 Then
.Left = .Left * 0.666
End If
If .Top <> 0 Then
.Top = .Top * 0.666
End If
End With
Next ctl
DoCmd.Close acForm, frm.Name, acSaveYes
End If
End If
.MoveNext
Loop
End With
MsgBox &quot;Done&quot;


PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top