For Duane Hookum

J

JohnB

Hi Duane

I posted to you a while back, asking how users could contol the depth of a
section in a report. Your response was as follows.

You might want to set a control source to an expression like:
=IIf(Forms!frmYourForm!chkBox=True,String(20,Chr(13) & Chr(10)),"")
This should make the text box 20 "lines" tall.

I was unable to get this running in work and due to limited time there Ive
been playing around with this at home on a sample Access 97 db. My work db
is Access 2002.

Here Ive done things slightly differently. I have put a field called
PrintDeep in a table and made sure this is in the control source for the
report, although its not actually shown as a field on the report. This field
is updated by users entering either Yes or No from a combo called
cboPrintDeep on a form. Ive set the text box in which I put the code to
CanGrow.

Ive changed your code to the following

=IIf([PrintDeep]="Yes",String(20,Chr(13) & Chr(10)),"")

What this actually produces is two rows of tiny boxes. If I swop the Chr
values I get 10 rows of boxes, two on each row. So its deepening the section
OK but I dont want to see anything in this text box.

Can you see whats wrong with this?

Thanks, JohnB
 
D

Duane Hookom

Apparently values in the field [PrintDeep] have some effect on the text box
size. You could just set the font size to something around 16 points and
fill the box with " " (spaces). I believe the spaces might be
enough to make the box taller.
 
P

PC Datasheet

John,

Try an expression like this in the detail format event:
Me.Section(0).Height = <String expression for the height you want>

Note that the height must be in Twips where a Twip = 1/1440 inch.
 
J

JohnB

Thanks for this.

Your suggestion is along the lines I was originally thinking about but I
don't fully understand you. Based on the info Ive supplied, what would the
String expression look like? Bear in mind that the user must be able to
determine those records that have a deep Section - Ive given them this
control by the use of the cboPrintDeep Yes/No combo.

Thanks again, JohnB


PC Datasheet said:
John,

Try an expression like this in the detail format event:
Me.Section(0).Height = <String expression for the height you want>

Note that the height must be in Twips where a Twip = 1/1440 inch.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


JohnB said:
Hi Duane

I posted to you a while back, asking how users could contol the depth of a
section in a report. Your response was as follows.

You might want to set a control source to an expression like:
=IIf(Forms!frmYourForm!chkBox=True,String(20,Chr(13) & Chr(10)),"")
This should make the text box 20 "lines" tall.

I was unable to get this running in work and due to limited time there Ive
been playing around with this at home on a sample Access 97 db. My work db
is Access 2002.

Here Ive done things slightly differently. I have put a field called
PrintDeep in a table and made sure this is in the control source for the
report, although its not actually shown as a field on the report. This field
is updated by users entering either Yes or No from a combo called
cboPrintDeep on a form. Ive set the text box in which I put the code to
CanGrow.

Ive changed your code to the following

=IIf([PrintDeep]="Yes",String(20,Chr(13) & Chr(10)),"")

What this actually produces is two rows of tiny boxes. If I swop the Chr
values I get 10 rows of boxes, two on each row. So its deepening the section
OK but I dont want to see anything in this text box.

Can you see whats wrong with this?

Thanks, JohnB
 
J

JohnB

Thanks Duane.

Ive got your suggestion to work now. Ive changed the code to the following
and set the textboxes font size to 16, then I made the box narrow,

=IIf([PrintDeep]="Yes"," ","")

Im still curious about the other suggestion though, which would seem to be
able to control the section height directly, without the need to add a
textbox. This is originally what I thought I could do. Ive asked for more
details but If I cant get it to work, Ill be happy to use your idea.

Thanks again for the help, JohnB


Duane Hookom said:
Apparently values in the field [PrintDeep] have some effect on the text box
size. You could just set the font size to something around 16 points and
fill the box with " " (spaces). I believe the spaces might be
enough to make the box taller.

--
Duane Hookom
MS Access MVP


JohnB said:
Hi Duane

I posted to you a while back, asking how users could contol the depth of a
section in a report. Your response was as follows.

You might want to set a control source to an expression like:
=IIf(Forms!frmYourForm!chkBox=True,String(20,Chr(13) & Chr(10)),"")
This should make the text box 20 "lines" tall.

I was unable to get this running in work and due to limited time there Ive
been playing around with this at home on a sample Access 97 db. My work db
is Access 2002.

Here Ive done things slightly differently. I have put a field called
PrintDeep in a table and made sure this is in the control source for the
report, although its not actually shown as a field on the report. This
field
is updated by users entering either Yes or No from a combo called
cboPrintDeep on a form. Ive set the text box in which I put the code to
CanGrow.

Ive changed your code to the following

=IIf([PrintDeep]="Yes",String(20,Chr(13) & Chr(10)),"")

What this actually produces is two rows of tiny boxes. If I swop the Chr
values I get 10 rows of boxes, two on each row. So its deepening the
section
OK but I dont want to see anything in this text box.

Can you see whats wrong with this?

Thanks, JohnB
 
D

Duane Hookom

I'm not sure why the Chr(13) & Chr(10)s don't work.

--
Duane Hookom
MS Access MVP


JohnB said:
Thanks Duane.

Ive got your suggestion to work now. Ive changed the code to the following
and set the textboxes font size to 16, then I made the box narrow,

=IIf([PrintDeep]="Yes"," ","")

Im still curious about the other suggestion though, which would seem to be
able to control the section height directly, without the need to add a
textbox. This is originally what I thought I could do. Ive asked for more
details but If I cant get it to work, Ill be happy to use your idea.

Thanks again for the help, JohnB


Duane Hookom said:
Apparently values in the field [PrintDeep] have some effect on the text box
size. You could just set the font size to something around 16 points and
fill the box with " " (spaces). I believe the spaces might be
enough to make the box taller.

--
Duane Hookom
MS Access MVP


JohnB said:
Hi Duane

I posted to you a while back, asking how users could contol the depth
of a
section in a report. Your response was as follows.

You might want to set a control source to an expression like:
=IIf(Forms!frmYourForm!chkBox=True,String(20,Chr(13) & Chr(10)),"")
This should make the text box 20 "lines" tall.

I was unable to get this running in work and due to limited time there Ive
been playing around with this at home on a sample Access 97 db. My work db
is Access 2002.

Here Ive done things slightly differently. I have put a field called
PrintDeep in a table and made sure this is in the control source for
the
report, although its not actually shown as a field on the report. This
field
is updated by users entering either Yes or No from a combo called
cboPrintDeep on a form. Ive set the text box in which I put the code to
CanGrow.

Ive changed your code to the following

=IIf([PrintDeep]="Yes",String(20,Chr(13) & Chr(10)),"")

What this actually produces is two rows of tiny boxes. If I swop the
Chr
values I get 10 rows of boxes, two on each row. So its deepening the
section
OK but I dont want to see anything in this text box.

Can you see whats wrong with this?

Thanks, JohnB
 
G

Guest

Hi Duane.

I hope you are still monitoring this thread. Ive just had a chance to try
out your original code here in the office, with the Chr(13) and Chr(10)
entries, and it works! Obviously the little boxes that were appearing when I
tried this at home are something to do with Access 97. So now I have a choice
of two ways to do this.

Many thanks for your help, JohnB

Duane Hookom said:
I'm not sure why the Chr(13) & Chr(10)s don't work.

--
Duane Hookom
MS Access MVP


JohnB said:
Thanks Duane.

Ive got your suggestion to work now. Ive changed the code to the following
and set the textboxes font size to 16, then I made the box narrow,

=IIf([PrintDeep]="Yes"," ","")

Im still curious about the other suggestion though, which would seem to be
able to control the section height directly, without the need to add a
textbox. This is originally what I thought I could do. Ive asked for more
details but If I cant get it to work, Ill be happy to use your idea.

Thanks again for the help, JohnB


Duane Hookom said:
Apparently values in the field [PrintDeep] have some effect on the text box
size. You could just set the font size to something around 16 points and
fill the box with " " (spaces). I believe the spaces might be
enough to make the box taller.

--
Duane Hookom
MS Access MVP


Hi Duane

I posted to you a while back, asking how users could contol the depth
of a
section in a report. Your response was as follows.

You might want to set a control source to an expression like:
=IIf(Forms!frmYourForm!chkBox=True,String(20,Chr(13) & Chr(10)),"")
This should make the text box 20 "lines" tall.

I was unable to get this running in work and due to limited time there Ive
been playing around with this at home on a sample Access 97 db. My work db
is Access 2002.

Here Ive done things slightly differently. I have put a field called
PrintDeep in a table and made sure this is in the control source for
the
report, although its not actually shown as a field on the report. This
field
is updated by users entering either Yes or No from a combo called
cboPrintDeep on a form. Ive set the text box in which I put the code to
CanGrow.

Ive changed your code to the following

=IIf([PrintDeep]="Yes",String(20,Chr(13) & Chr(10)),"")

What this actually produces is two rows of tiny boxes. If I swop the
Chr
values I get 10 rows of boxes, two on each row. So its deepening the
section
OK but I dont want to see anything in this text box.

Can you see whats wrong with this?

Thanks, JohnB
 
D

Duane Hookom

I'm not sure why it didn't work in A97. Glad to hear you have a couple
solutions.

--
Duane Hookom
MS Access MVP
--

JohnB said:
Hi Duane.

I hope you are still monitoring this thread. Ive just had a chance to try
out your original code here in the office, with the Chr(13) and Chr(10)
entries, and it works! Obviously the little boxes that were appearing when
I
tried this at home are something to do with Access 97. So now I have a
choice
of two ways to do this.

Many thanks for your help, JohnB

Duane Hookom said:
I'm not sure why the Chr(13) & Chr(10)s don't work.

--
Duane Hookom
MS Access MVP


JohnB said:
Thanks Duane.

Ive got your suggestion to work now. Ive changed the code to the
following
and set the textboxes font size to 16, then I made the box narrow,

=IIf([PrintDeep]="Yes"," ","")

Im still curious about the other suggestion though, which would seem to
be
able to control the section height directly, without the need to add a
textbox. This is originally what I thought I could do. Ive asked for
more
details but If I cant get it to work, Ill be happy to use your idea.

Thanks again for the help, JohnB


Apparently values in the field [PrintDeep] have some effect on the
text
box
size. You could just set the font size to something around 16 points
and
fill the box with " " (spaces). I believe the spaces might be
enough to make the box taller.

--
Duane Hookom
MS Access MVP


Hi Duane

I posted to you a while back, asking how users could contol the
depth
of
a
section in a report. Your response was as follows.

You might want to set a control source to an expression like:
=IIf(Forms!frmYourForm!chkBox=True,String(20,Chr(13) & Chr(10)),"")
This should make the text box 20 "lines" tall.

I was unable to get this running in work and due to limited time
there
Ive
been playing around with this at home on a sample Access 97 db. My
work
db
is Access 2002.

Here Ive done things slightly differently. I have put a field called
PrintDeep in a table and made sure this is in the control source for
the
report, although its not actually shown as a field on the report.
This
field
is updated by users entering either Yes or No from a combo called
cboPrintDeep on a form. Ive set the text box in which I put the code
to
CanGrow.

Ive changed your code to the following

=IIf([PrintDeep]="Yes",String(20,Chr(13) & Chr(10)),"")

What this actually produces is two rows of tiny boxes. If I swop the
Chr
values I get 10 rows of boxes, two on each row. So its deepening the
section
OK but I dont want to see anything in this text box.

Can you see whats wrong with this?

Thanks, JohnB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Rich Text Format 0
Text box incomplete in GroupFooter 0
Duane Hookum 7
Removing Empty Line 5
Trouble with chr(13) & chr(10) in IIF statement 3
P.O. Box and concatenation hiccup 2
Carriage Return 2
IIf statement 2

Top