Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

Move Objects in Report Header

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nigel - 04 Feb 2006 19:41 GMT
I am tryuing to dynamically position fields and labels in a report header
based on selections made by the user

I have entered the following in the On Format properties section

If DLookup("location", "repgroups") = "Left" Then
Reports![Safety Meetings]!CompanyLogo.top = "0.0417"
Reports![Safety Meetings]!repgroup.top = "0.0417"
Reports![Safety Meetings]!JOBNumber.top = "0.0417"
Reports![Safety Meetings]!Label1.Properties.top = "0.0417"
Reports![Safety Meetings]!SAFEDate.top = "0.3333"
Reports![Safety Meetings]!Label3.top = "0.3333"
end if

the only propblem is it puts everything at the top and doesn't position them
where I want them to go. I know I am missing something obvious here and maybe
someone can help me

thanks
fredg - 04 Feb 2006 20:14 GMT
> I am tryuing to dynamically position fields and labels in a report header
> based on selections made by the user
[quoted text clipped - 13 lines]
>
> thanks

Not sure of what you mean when you say it "doesn't position them where
you want them to go". You're only changing the Top property of those
controls. As written they will all appear to the eye to be at the very
top of the section.
All Access measurements are in Twips (1440 per inch).
The difference between 0.333 and 0.0417 is too small to be seen.
To further your problem you have made the value a string, not a
number.
Try:

If DLookup("location", "repgroups") = "Left" Then
  Me!CompanyLogo.top = 0.0417 * 1440
  Me!repgroup.top = 0.0417 * 1440
  Me!JOBNumber.top = 0.0417 * 1440
  Me!Label1.Properties.top = 0.0417 * 1440
  Me!SAFEDate.top = 0.3333 * 1440
  Me!Label3.top = 0.3333 * 1440
End if

Is that better?

Now what do you want to do if the value is not "regroups"?
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Nigel - 05 Feb 2006 03:33 GMT
This worked perfectly thanks, once I got the first part I can do the rest I
just needed to be poushed in the right direction,

Thank you so much

Great Job

> > I am tryuing to dynamically position fields and labels in a report header
> > based on selections made by the user
[quoted text clipped - 36 lines]
>
> Now what do you want to do if the value is not "regroups"?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.