Different Alignment of controls on Reports

steve1111

Registered User.
Local time
Today, 04:03
Joined
Jul 9, 2013
Messages
170
Hello,

I am not sure if this is possible, but what i am looking for is a control on each line item on a report to align differently based on a rule. What i am trying to accomplish is separating notes out based on the user.

So any notes from myself i want to align on the left side of the report, but any notes not from myself i want to align that line item on the right side of the report (think of an chat/text message type screen).

I have:

If Me.FromUserID = Forms!frmMain!txtRMID Then
Me.dTimeStamp.Left = 1440 * 6.26
Else
Me.dTimeStamp.Left = 1440 * 0.1
End If

but i am not getting the results i want with the OnCurrent as i have to click each line item and then it moves All the dTimeStamps one way or the other.

Any ideas and if this is possible with a moderately proficient VBA user? I can go the basic route if needed but looking for that extra level of visual help.

Thanks
 
I haven't tried to do that, but if it can be done the correct event would be the format event of the section containing the control (presuming you're using Print or Preview modes).
 
Got me A LOT closer, thanks Paul!
 
Hey Paul,

I decided to go to a continuous form, because the On Format was not working correctly for the Report View and you cannot put a Print Preview report in a form as a subform. So i am running into a similar issue now where the code works on the On Open of the continuous form, but wants to put all the controls to one side or the other based on the "first" continuous form, rather than evaluate "each" record in the continuous form. Is this something that the continuous forms can support to look at each record?
 
Actually by chance the OnPaint of the detail did the trick for anyone looking into this issue.
 
In report view you can use the paint event.
 
Ah, I'm too slow. You can't really do this type of thing with code on a form.
 

Users who are viewing this thread

Back
Top Bottom