Move Objects in Report Header

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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



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 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
someone can help me

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"?
 
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

fredg said:
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



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 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
someone can help me

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"?
 
Back
Top