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

Don't know how best to describe problem but really stuck!!

Status
Not open for further replies.

mbaddar

Programmer
May 10, 2001
120
US
Hi,

I'm really stuck on this one. I have a report with two text boxes that are sent to can grow and can shrink. Each text box is set to a control source ("ConcatenateMessage").

My query checks whether Message1 (date1) is different than Message1 (date2). If these two messages are different there are pulled back from my query. Then they are sent to my ConcatenateMessage function. Sometimes Message1 (date1) is five lines long on my report and Message1 (date2) is only one line on my report. Then Message2(date1) is five lines again and Message2(date2) is only one line again. The textboxes have there can shrink and can grow properties set to true. So, the Message2 text box with the shorter messages doesn't line up with the Message1 text box in these cases.

Can anything be done about this? It's driving me crazy.

This is the code that concatenates my messages:

Function ConcatenateMessages(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12)

Dim Mess1, Mess2, Mess3, Mess4, Mess5, Mess6, Mess7, Mess8, Mess9, Mess10, Mess11, Mess12

CR$ = Chr(13) & Chr(10) 'Carriage return and line feed.


If var1 & &quot;&quot; <> &quot;&quot; Then
Mess1 = &quot;&quot; & var1 & CR$
Else
Mess1 = &quot;&quot;
End If
If var2 & &quot;&quot; <> &quot;&quot; Then
Mess2 = &quot;&quot; & var2 & CR$
Else
Mess2 = &quot;&quot;
End If
If var3 & &quot;&quot; <> &quot;&quot; Then
Mess3 = &quot;&quot; & var3 & CR$
Else
Mess3 = &quot;&quot;
End If
If var4 & &quot;&quot; <> &quot;&quot; Then
Mess4 = &quot;&quot; & var4 & CR$
Else
Mess4 = &quot;&quot;
End If
If var5 & &quot;&quot; <> &quot;&quot; Then
Mess5 = &quot;&quot; & var5 & CR$
Else
Mess5 = &quot;&quot;
End If
If var6 & &quot;&quot; <> &quot;&quot; Then
Mess6 = &quot;&quot; & var6 & CR$
Else
Mess6 = &quot;&quot;
End If
If var7 & &quot;&quot; <> &quot;&quot; Then
Mess7 = &quot;&quot; & var7 & CR$
Else
Mess7 = &quot;&quot;

End If
If var8 & &quot;&quot; <> &quot;&quot; Then
Mess8 = &quot;&quot; & var8 & CR$
Else
Mess8 = &quot;&quot;
End If
If var9 & &quot;&quot; <> &quot;&quot; Then
Mess9 = &quot;&quot; & var9 & CR$
Else
Mess9 = &quot;&quot;
End If
If var10 & &quot;&quot; <> &quot;&quot; Then
Mess10 = &quot;&quot; & var10 & CR$
Else
Mess10 = &quot;&quot;
End If
If var11 & &quot;&quot; <> &quot;&quot; Then
Mess11 = &quot;&quot; & var11 & CR$
Else
Mess11 = &quot;&quot;
End If
If var12 & &quot;&quot; <> &quot;&quot; Then
Mess12 = &quot;&quot; & var12 & CR$
Else
Mess12 = &quot;&quot;
End If

ConcatenateMessages = Mess1 & Mess2 & Mess3 & Mess4 & Mess5 & Mess6 & Mess7 & Mess8 & Mess9 & Mess10 & Mess11 & Mess12 'concatenate the strings.


Thanks,
MBaddar
 
I am - more-or-less completly confused by your post. What do you mean by &quot;line up&quot;? The can grow/can shrink properties will only vary the height of the text boxes, so the only thing which will change is the 'bottom' (Top + Height). I do not understand how / why this would be a PROBLEM. If you lay out the report with only the two text boxes on the line (all other controls above / below this line) and place a line control below the two textboxes then everthing below the two will move 'in unision'. Better, if you can just arrange to put the two text boxes on the bottom line of the report section.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Hi Michael,

Sorry if it was confusing. I had a hard time describing the problem. Basically I can have up to 15 messages in my first text box to handle date #1 (my before date). I can also have up to 15 messages in my second text box to handle date #2 messages (my after date text box). My &quot;Before&quot; date text box is on the left of my report and the &quot;After&quot; date is right beside it. These two text boxes are comparing these values of the before and after date values of these messages. If there is a change with them (if message 1 before date is different from message 2 after date) then they should appear in both text boxes (the before date in one and the after date message in the second text box).

Sometimes message 1 in my &quot;Before&quot; date text box is only 1 line long and message 1 in my &quot;After&quot; date text box is five lines long. Then, there may be a message #2 after my first message line in my first text box and a message 2 in my second text box with different lengths. In these cases, the tops and bottoms of these messages are not lining up.

Hope this makes my problem more clear.
Thanks,
MBaddar
 
O.K. what you are describing is a 'continuiious forms' report. It has multiple instances of the two text bokes. In design view you see only &quot;text1&quot; and &quot;text2&quot; beside each other. When the report is run, these become two columns of text boxes, but the grow/shrikn properties get their vertical positions out of 'sync'?

then the Line control under the text boxes should work. IN design view, add a &quot;line conreol&quot; immediatly below the two text boxes. Should be &quot;DONE&quot;. Run the report and see what it looks like.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Hi Michael,

Thanks for the response. You were right about what's happening. I tried to follow your advice. I'm not sure if my report is set for continuous forms (checked under the properties. I didn't see that as an option). I thought that was a property of the subform only. Is that a property of a report also? I put a regular line (not sure if that's what you meant) under the two text boxes. All the messages were displayed inside each individual textbox and the line appeared underneath all of the messages. So, it doesn't seem that with my report that each textbox is being repeated into multiple instances. Should I try putting these text boxes into a subform instead and leave this subform in the details section of my report? Would this give me multiple instances of the textboxes? Or, is there another way to get the multiple instances instead of the one large one (as I am getting)? Or, did I misunderstand what you were saying?

Thanks,
MBaddar
 
I think we are - at least - now discussing the same issue. with the possible exception of confusion between report and form. I read the original post as refering to the problem in a REPORT.

That aside, I thought that the line should 'force' the controls to re-align with each record.

I just tried a sample, and this DOES appear to Work.

The design view detail section looks like?

Code:
text1[tab][tab][tab][tab][tab][tab]text2
________________________________________  <==(Line3)

except the &quot;lline control is closer tot he text boxes. the Line control is on the Toolbar (Hammer and Wrench - crossed).



MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top