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

Form Resize!!

Status
Not open for further replies.

Fekri

Programmer
Jan 3, 2004
284
IR
Hi,

I found the sample which will resize the forms as per resolution,
That's So nice but I did as It' writen in but when I copy & Pase that code to new module of my database,
I can't call it!!!
In Instruction of this sample is written:

[red]Enter the following line of code:" ResizeForm Me" (without the quotes!)[/red]

but ResizeForm Me is not available in my database!!!

Any body know why?? any thing to be change in code to be active???

thanks
ali

Thanks & Good Luck
Ali Fekri
 
When you entered the code for the function into a new standard module, did you by any chance name that module ResizeForm? Naming a module the same as a function confuses the Access gnomes no end! If this is what you've done, rename the module to something else.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
No, I didn't.

Actually, when I want to add this in "onload" of form,
in expression builder, I can see this module name.
But there is no function in it to set in Onload????
I think some thing in this module to be change which I don't know..
If you download it and export this module to any database, you will see all the function in this module will not shown in the event ot expression builder???

Thanks
Ali

Thanks & Good Luck
Ali Fekri
 
How are ya Fekri . . .

Post where you found the code?

Is the function/sub [blue]Private![/blue] If so, it needs to be made [blue]Public[/blue] . . .


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Fekri, Subs do stuff and Functions return values. Functions are available in the expression builder subs are not, to call a sub you'll need to use the code builder instead. Is this code actually a Function or is it a Sub?
 
Howdy RivetHed . . .

If as [blue]Fekri[/blue] precsribes, a macro will call the code, then it [blue]has to be a function![/blue] Why call from a macro is not making sense . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Aceman,

Just guessing at the problem since he specifically mentioned the expression builder.

Also, would you have a procedure for resizing a form in a function rather than a sub?
 
1) I downloaded from Zameer's link.
2) I created a new module in my database called
mdlResize
3) I copied everything from the view code window and pasted it in my
mdlResize
4) In my on load event of my form I typed
Private Sub Form_Load()
MsgBox "resize"
mdlResize.ReSizeForm Me
End Sub

Works fine
 
Sorry to all for delay,

I have read all but It's not so clear for me..
Yes the link which Mr.Zameer is mentioned is the exactly the one which I couldn't use!!
also I used Majp recommendation but there is no any different size in any resolution in my database!!!
I think some think as Aceman told to be change in this code!!!

If it's necessary I can pase the code here..

thanks to all
Ali

Thanks & Good Luck
Ali Fekri
 

"also I used Majp recommendation but there is no any different size in any resolution in my database!!!"

Are you saying that if you change the resolution on your monitor the size of the database doesn't remain the same? That's the whole point of the function.

What resolution was the database developed in? The documentation that comes with this states that, like most of these hacks, it's designed to take an app developed in a lower reso;ution and resize it to a higher resolution.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Fekri . . .

Again . . . can you post where you got the code?

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top