473,769 Members | 3,828 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2638
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(Ca ncel As Integer, PrintCount As Integer)
Call Justi1.fRecordS ection(Me, Me.txtTestmemo, PrintCount)
Call Justi2.fRecordS ection(Me, Me.txtTestMemo2 , PrintCount)
End Sub

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

Private Sub Report_Open(Can cel As Integer)
DoCmd.Maximize
End Sub

Private Sub Report_Page()
Dim myBool As Boolean
myBool = Justi1.fJustiDi rect(Me)
myBool = Justi2.fJustiDi rect(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.********@ntl world.com> wrote in message
news:2f******** *************** ***@posting.goo gle.com...
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
3417
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 (Chinese) text in my RTF field, and such records get sized strangely using the .RTFHeight property of the control. Specifically, lines of text get cut off the bottom of the control when I use the code provided in the sample report on the lebans.com site. It seems that when there is Chinese text,...
5
3429
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 a way to specifically tell it to start at the current date instead? Note: it does this fine if I'm using it in the context of a form's text box, but I'm trying to use it on a module which is called, whereby the date chosen is the date plugged into a variable. Everytime after I reset the...
1
3112
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 possible. Thanks. Alex
6
2701
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. The classes I am using are located at http://www.lebans.com/DownloadFiles/A2kTooltip.zip So far the classes work perfectly, except that now I need to extend it to support other controls besides the ones given in the example form. I have gotten it to work with some controls, but not others. I...
0
1533
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 textbox on the same form as the RTF control and camouflage it, don't hide it. 2) Trap the keyboard shortcut for spellcheck, usually F7 3) Copy the plain text contents of the RTF control to the textbox and set focus 4) DoCmd.RunCommand acCmdSpelling on the textbox
1
1478
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' examples called Tooltip.mdb and ComboCurrentRow.mdb, but I can't seem to be able to combine the two to get a Tooltip to show data from (a hidden column in) the current row of the combobox.
6
2313
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 line of the detail section of my report is missing 2 of the 9 fields. The rest of the report is fine. In looking at his website there is a version note on 2/21/06 indicating he fixed the "missing lines produced by the report line tool issue". I am wondering if this was the problem I am...
4
2224
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 bolded I have pasted it here, can somebody help? I need Last_Name, Suff, First_Name, Middle_Name bolded, the rest normal. Thanks Melissa ' **START CODE ' Written by Stephen Lebans 1999 ' Stephen@lebans.com ' www.lebans.com ' This sample database is for a Poster named "Lady". ' She...
1
1411
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 physical size of the textbox was insufficient to display all the text in the source table's memo field. One could, I suppose, simply count the displayable chars at various acceptable fontsize settings and use If-Then or Select Case to effect an appropriate change. But Lebans' solution, I think, is a...
1
9984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9851
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7401
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.