suppressing field position

A

Andreas

Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various parts
of the address. If for example the street addresses are blank, you want the
city line to move upwards instead of staying 3 lines below)
 
S

Stefan Hoffmann

hi Andreas,
Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various parts
of the address. If for example the street addresses are blank, you want the
city line to move upwards instead of staying 3 lines below)
Set the CanShrink property to True. Otherwise use a calculated field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
A

Andreas

Where should I apply those 2? on each one of the fields?

If I use the 2nd, then I won't be able to apply formatting, i.e different
font or size, right?
Now I have a text box for each, and I format each one individually


Stefan Hoffmann said:
hi Andreas,
Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are blank, you
want the city line to move upwards instead of staying 3 lines below)
Set the CanShrink property to True. Otherwise use a calculated field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
T

tina

set the CanGrow and CanShrink properties of *each control* to Yes, AND do
the same for the section that the controls are in. in report Design view,
make sure that there is no space between the controls. you don't have to
move them closer together; you can just drag down the *bottom* edge of each
control until it touches (but doesn't overlap) the top edge of the control
below it.

hth


Andreas said:
Where should I apply those 2? on each one of the fields?

If I use the 2nd, then I won't be able to apply formatting, i.e different
font or size, right?
Now I have a text box for each, and I format each one individually


Stefan Hoffmann said:
hi Andreas,
Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are blank, you
want the city line to move upwards instead of staying 3 lines below)
Set the CanShrink property to True. Otherwise use a calculated field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
A

Andreas

If *each control* are the address fields and "the section that the controls
are in" is the Report Header in which those fields are in, then I did set
both properties of all of them to yes but still, each field will appear in
the posistion of the report in which I placed it.

My fields are placed as follows:

Name
Address1
Address2
PCode City

Each textbox touches the borders of its neighbour


tina said:
set the CanGrow and CanShrink properties of *each control* to Yes, AND do
the same for the section that the controls are in. in report Design view,
make sure that there is no space between the controls. you don't have to
move them closer together; you can just drag down the *bottom* edge of
each
control until it touches (but doesn't overlap) the top edge of the control
below it.

hth


Andreas said:
Where should I apply those 2? on each one of the fields?

If I use the 2nd, then I won't be able to apply formatting, i.e different
font or size, right?
Now I have a text box for each, and I format each one individually


Stefan Hoffmann said:
hi Andreas,

Andreas schrieb:
Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are blank, you
want the city line to move upwards instead of staying 3 lines below)
Set the CanShrink property to True. Otherwise use a calculated field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) &
[City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
T

tina

well, i don't know why it's not working for you - sounds like you've set the
Properties correctly. (btw, "controls" is the proper terminology. fields are
supplied by the report's RecordSource. the data in those fields are
displayed on the report when you bind those fields to *controls* within the
report. the controls are the objects the you move around and manipulate in
report Design view.)

hmm, one thing you need to check - it's hard to explain without pictures, so
bear with me: let's say your four controls are lined up on the left side of
the ReportHeader section, as

Name
Address1
Address2
PCode City

do you have any other controls to the *right* of that group of four? if so,
it's trickier to get the section to shrink. let me know if this is your
situation, before i go any further.

hth


Andreas said:
If *each control* are the address fields and "the section that the controls
are in" is the Report Header in which those fields are in, then I did set
both properties of all of them to yes but still, each field will appear in
the posistion of the report in which I placed it.

My fields are placed as follows:

Name
Address1
Address2
PCode City

Each textbox touches the borders of its neighbour


tina said:
set the CanGrow and CanShrink properties of *each control* to Yes, AND do
the same for the section that the controls are in. in report Design view,
make sure that there is no space between the controls. you don't have to
move them closer together; you can just drag down the *bottom* edge of
each
control until it touches (but doesn't overlap) the top edge of the control
below it.

hth


Andreas said:
Where should I apply those 2? on each one of the fields?

If I use the 2nd, then I won't be able to apply formatting, i.e different
font or size, right?
Now I have a text box for each, and I format each one individually


hi Andreas,

Andreas schrieb:
Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are blank, you
want the city line to move upwards instead of staying 3 lines below)
Set the CanShrink property to True. Otherwise use a calculated field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) &
[City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
A

Andreas

At the right side of the paper, I have labels, one beneath another. Those
address fields that I mentioned have a box on the back of them if that
matters. Imagine a box that includes the receipient's address enclosed in a
box and on the left side, outlined the company's address details.



tina said:
well, i don't know why it's not working for you - sounds like you've set
the
Properties correctly. (btw, "controls" is the proper terminology. fields
are
supplied by the report's RecordSource. the data in those fields are
displayed on the report when you bind those fields to *controls* within
the
report. the controls are the objects the you move around and manipulate in
report Design view.)

hmm, one thing you need to check - it's hard to explain without pictures,
so
bear with me: let's say your four controls are lined up on the left side
of
the ReportHeader section, as

Name
Address1
Address2
PCode City

do you have any other controls to the *right* of that group of four? if
so,
it's trickier to get the section to shrink. let me know if this is your
situation, before i go any further.

hth


Andreas said:
If *each control* are the address fields and "the section that the controls
are in" is the Report Header in which those fields are in, then I did set
both properties of all of them to yes but still, each field will appear
in
the posistion of the report in which I placed it.

My fields are placed as follows:

Name
Address1
Address2
PCode City

Each textbox touches the borders of its neighbour


tina said:
set the CanGrow and CanShrink properties of *each control* to Yes, AND do
the same for the section that the controls are in. in report Design view,
make sure that there is no space between the controls. you don't have
to
move them closer together; you can just drag down the *bottom* edge of
each
control until it touches (but doesn't overlap) the top edge of the control
below it.

hth


Where should I apply those 2? on each one of the fields?

If I use the 2nd, then I won't be able to apply formatting, i.e different
font or size, right?
Now I have a text box for each, and I format each one individually


hi Andreas,

Andreas schrieb:
Is there a way to suppress a fields position if the adjuscent
fields
are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are
blank,
you
want the city line to move upwards instead of staying 3 lines
below)
Set the CanShrink property to True. Otherwise use a calculated
field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) &
[City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
T

tina

bingo, there's your problem - the Rectangle control; it has no Grow/Shrink
properties. you can try setting the control's Height property in the
section's OnFormat event procedure, based on whether or not the Address2
field contains a value. something along the lines of

If IsNull(Me!Address2) Then
Me!RectangleControlName.Height = <some value>
Else
Me!RectangleControlName.Height = <another value>
End If

manipulating report sections programmatically is not one of my strong
points; i'm not sure if the "grow/shrink" actions takes place before or
after the section Format event - but it's worth a try. if it doesn't work
for you, suggest you start a new thread explaining how the report section is
set up, including the "box" info and the Grow/Shrink property settings - and
ask for help in resizing the box so the section will grow/shrink as needed.

hth


Andreas said:
At the right side of the paper, I have labels, one beneath another. Those
address fields that I mentioned have a box on the back of them if that
matters. Imagine a box that includes the receipient's address enclosed in a
box and on the left side, outlined the company's address details.



tina said:
well, i don't know why it's not working for you - sounds like you've set
the
Properties correctly. (btw, "controls" is the proper terminology. fields
are
supplied by the report's RecordSource. the data in those fields are
displayed on the report when you bind those fields to *controls* within
the
report. the controls are the objects the you move around and manipulate in
report Design view.)

hmm, one thing you need to check - it's hard to explain without pictures,
so
bear with me: let's say your four controls are lined up on the left side
of
the ReportHeader section, as

Name
Address1
Address2
PCode City

do you have any other controls to the *right* of that group of four? if
so,
it's trickier to get the section to shrink. let me know if this is your
situation, before i go any further.

hth


Andreas said:
If *each control* are the address fields and "the section that the controls
are in" is the Report Header in which those fields are in, then I did set
both properties of all of them to yes but still, each field will appear
in
the posistion of the report in which I placed it.

My fields are placed as follows:

Name
Address1
Address2
PCode City

Each textbox touches the borders of its neighbour


set the CanGrow and CanShrink properties of *each control* to Yes,
AND
do
the same for the section that the controls are in. in report Design view,
make sure that there is no space between the controls. you don't have
to
move them closer together; you can just drag down the *bottom* edge of
each
control until it touches (but doesn't overlap) the top edge of the control
below it.

hth


Where should I apply those 2? on each one of the fields?

If I use the 2nd, then I won't be able to apply formatting, i.e different
font or size, right?
Now I have a text box for each, and I format each one individually


hi Andreas,

Andreas schrieb:
Is there a way to suppress a fields position if the adjuscent
fields
are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are
blank,
you
want the city line to move upwards instead of staying 3 lines
below)
Set the CanShrink property to True. Otherwise use a calculated
field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) &
[City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
A

Andreas

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]

That code generates #error


Stefan Hoffmann said:
hi Andreas,
Is there a way to suppress a fields position if the adjuscent fields are
blank? (i.e. in a report you design a box that will store the various
parts of the address. If for example the street addresses are blank, you
want the city line to move upwards instead of staying 3 lines below)
Set the CanShrink property to True. Otherwise use a calculated field:

=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]

Notice the use of + and & for handling Null values.


mfg
--> stefan <--
 
S

Stefan Hoffmann

hi Andreas,
=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]
That code generates #error
It works for me on Access 2003. Only the following has to be corrected:

=([Name] + Chr(13) + Chr(10)) & ([Address] + Chr(13) + Chr(10)) & [City]

Where have you put this "code"?


mfG
--> stefan <--
 
A

Andreas

I deleted all other fields and used only one field with this code in the
control source


Stefan Hoffmann said:
hi Andreas,
=([Name] + Chr(13) & Chr(10)) & ([Address] + Chr(13) & Chr(10)) & [City]
That code generates #error
It works for me on Access 2003. Only the following has to be corrected:

=([Name] + Chr(13) + Chr(10)) & ([Address] + Chr(13) + Chr(10)) & [City]

Where have you put this "code"?


mfG
--> stefan <--
 

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

Top