472,353 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Lebans textbox justification - how do you use it?

Delighted to find Lebans textbox justification but...

....after you have downloaded the sample database, with its module,
what do you do to make your own text boxes in your own database have
justified text?

I have tried copying the module out of the sample database but that,
in itself, didn't do the trick.
Nov 13 '05 #1
7 2512
Look at the source code behind the sample Reports, for example the
report named "rptClass JustifyText".

' ********START CODE
Option Compare Database
Option Explicit
Dim Justi1 As New clsJustifyText
Dim Justi2 As New clsJustifyText

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Call Justi1.fRecordSection(Me, Me.txtTestmemo, PrintCount)
Call Justi2.fRecordSection(Me, Me.txtTestMemo2, PrintCount)
End Sub

Private Sub Report_Close()
Set Justi1 = Nothing
Set Justi2 = Nothing
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
End Sub

Private Sub Report_Page()
Dim myBool As Boolean
myBool = Justi1.fJustiDirect(Me)
myBool = Justi2.fJustiDirect(Me)
'Debug.Print "SF Page event"

End Sub
' ********END CODE

You need to duplicate this code behind your own report. Make sure you go
through the user interface and select "Event Procedure" behind the
Detail section's PRINT event and the report's PAGE event.

This sample report has two TextBox controls that is justifies Text in,
named txtTestMemo and txtTestMemo2. Look at the properties for each
TextBox control.

The Font color is set to WHITE.
The ControlSource is set to the memo field named testmemo.

An alternative to all of this is to use my JustifyText ActiveX control.
The only drawback is that it does not support CanGrow/Shrink as the
JustiDirect solution does.
http://www.lebans.com/xjustifytext.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <m.********@ntlworld.com> wrote in message
news:2f**************************@posting.google.c om...
Delighted to find Lebans textbox justification but...

...after you have downloaded the sample database, with its module,
what do you do to make your own text boxes in your own database have
justified text?

I have tried copying the module out of the sample database but that,
in itself, didn't do the trick.


Nov 13 '05 #2

Yes, that works. Especially after I changed the font to white - double
vision before that.

Your older ActiveX solution worked fine at home but wasn't so bright on
the network at work. Lost my date() function until I unchecked the
ActiveX - which wasn't on the network etc. I didn't want the textbox to
grow so that didn't bother me.

So it looks like the code will be the cleaner solution.

Thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

Yes, that works. Especially after I changed the font to white - double
vision before that.

Your older ActiveX solution worked fine at home but wasn't so bright on
the network at work. Lost my date() function until I unchecked the
ActiveX - which wasn't on the network etc. I didn't want the textbox to
grow so that didn't bother me.

So it looks like the code will be the cleaner solution.

Thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
I spoke too soon. While the code works on my home PC it will not work
on the PC/network at work.

It halts at the call for justi1, as far as I can remember.

Any ideas why?

Is it possible that there are VB libraries that need installing or some
such thing?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5
No, the code does not require any explicit References.

Kind of tough to diagnose the issue with the information you are
supplying.
Try running one of the report's in the sample MDB you downloaded.

FInally, ensure you have a Default printer defined for the Report.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <nosp@m> wrote in message news:41**********@127.0.0.1...
I spoke too soon. While the code works on my home PC it will not work
on the PC/network at work.

It halts at the call for justi1, as far as I can remember.

Any ideas why?

Is it possible that there are VB libraries that need installing or some such thing?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #6
The downloaded sample doesn't work either.

However, our network technician has just installed the ActiveX on one of
our PCs so that I can now use that method.

Could the failure of the code to run be to do with DAO v ADO?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #7
As I stated the first time there are no DAO dependencies or any other
external libraries required.
Again I ask, what is the error message?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mark Thomas" <nosp@m> wrote in message news:41**********@127.0.0.1...
The downloaded sample doesn't work either.

However, our network technician has just installed the ActiveX on one of our PCs so that I can now use that method.

Could the failure of the code to run be to do with DAO v ADO?

Mark Thomas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language...
5
by: Larry R Harrison Jr | last post by:
I use the Lebans calendar control and love it; the only thing is that it commonly starts out at the year 1899 rather than the current year. Is there...
1
by: Alex | last post by:
The JustiDirect text justification on Stephen LeBans site works well but I cannot get it to work on a sub report. Could anyone tell me if this is...
6
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. ...
0
by: evilhanz | last post by:
I am using Mr. Lebans' RTF2 Control v1.4. I have managed to spell check its contents but it's a terrible kludge. Here's how I do it: 1) Put a...
1
by: Bob Quintal | last post by:
Hi, I have an application where I need to show detailed information about items in a dropped-down combobox. I have been studying Mr Lebans'...
6
by: ldn95887 | last post by:
I have been using Lebans ReportToPDF code for a couple months without problems. We recently changed the format of the invoice and now the first...
4
by: mdarling | last post by:
I am using Lebans lady example to mix Bold and Normal in a single line text box, I have altered it and I still cant get it to bold the text I need...
1
by: MLH | last post by:
Was hoping to make use of AutoSizeFont\AutoSizeFontVer2.mdb procedures to auto-resize fonts in a textbox control on a report when the fixed...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.