trouble with report that has lots of controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a report on my system at home (Access2003) worked perfectly. I
then updated my development system at work (Access2002) When I tried to
preview the report from design view it would flash a blank report window for
a sec then return to design view. When I ran the code that calls the report,
I got an error saying that the page it was trying to access didn't exist. I
tried to get around that by creating a new report in design view and copying
the fields from the report that I had created at home. The same thing
happened from design view, but from the code that called the report, I got
the error message property does not exist. I then deleted the report I just
created and started again. This time only copying a few fields at a time and
testing to find the problem field. I get all of the lables copied with no
problems. I get a few of the data fields copied before it has a problem. So
I deleted the data fields that I copied and am trying to recreate those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are small text
boxes that I have a similar statemtent in (just the condition fieldname is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3, X6AM4 from
6AM to 7PM I.E. a field for each of the 15minute increments between 6am and
8pm. I have conditional formatting on each on of these fields to set the
foreground and background color to the same color (A different yellow tint
for each of the 4 blocks in each hour). I'm trying to show blocks of
scheduled time on the report, and as I stated before it works fine on my
laptop, I can't get it to work at work) When I add a block beyond the first
4 blocks then all five blocks show #. When I remove the 5th block, then the
first four work again.
 
thanks, but access won't open the download do to security issues, and I don't
know away around it. however my design more closely resembles what my bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a bargraph
The report looks great on my system. I just need it to work at work.


Duane Hookom said:
This won't resolve your current issue but if you are looking for a report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

tw said:
I created a report on my system at home (Access2003) worked perfectly. I
then updated my development system at work (Access2002) When I tried to
preview the report from design view it would flash a blank report window
for
a sec then return to design view. When I ran the code that calls the
report,
I got an error saying that the page it was trying to access didn't exist.
I
tried to get around that by creating a new report in design view and
copying
the fields from the report that I had created at home. The same thing
happened from design view, but from the code that called the report, I got
the error message property does not exist. I then deleted the report I
just
created and started again. This time only copying a few fields at a time
and
testing to find the problem field. I get all of the lables copied with no
problems. I get a few of the data fields copied before it has a problem.
So
I deleted the data fields that I copied and am trying to recreate those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are small text
boxes that I have a similar statemtent in (just the condition fieldname is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3, X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments between 6am
and
8pm. I have conditional formatting on each on of these fields to set the
foreground and background color to the same color (A different yellow tint
for each of the 4 blocks in each hour). I'm trying to show blocks of
scheduled time on the report, and as I stated before it works fine on my
laptop, I can't get it to work at work) When I add a block beyond the
first
4 blocks then all five blocks show #. When I remove the 5th block, then
the
first four work again.
 
There is a calendar report that presents information like this that uses
about 5 controls in the detail section. Rather than using lots of controls,
I would suggest that you modify the Left and Width properties of a control
to display your information.

I have no idea why your current solution doesn't work but I would concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

tw said:
thanks, but access won't open the download do to security issues, and I
don't
know away around it. however my design more closely resembles what my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a bargraph
The report looks great on my system. I just need it to work at work.


Duane Hookom said:
This won't resolve your current issue but if you are looking for a report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

tw said:
I created a report on my system at home (Access2003) worked perfectly.
I
then updated my development system at work (Access2002) When I tried to
preview the report from design view it would flash a blank report
window
for
a sec then return to design view. When I ran the code that calls the
report,
I got an error saying that the page it was trying to access didn't
exist.
I
tried to get around that by creating a new report in design view and
copying
the fields from the report that I had created at home. The same thing
happened from design view, but from the code that called the report, I
got
the error message property does not exist. I then deleted the report I
just
created and started again. This time only copying a few fields at a
time
and
testing to find the problem field. I get all of the lables copied with
no
problems. I get a few of the data fields copied before it has a
problem.
So
I deleted the data fields that I copied and am trying to recreate those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are small
text
boxes that I have a similar statemtent in (just the condition fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3, X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments between 6am
and
8pm. I have conditional formatting on each on of these fields to set
the
foreground and background color to the same color (A different yellow
tint
for each of the 4 blocks in each hour). I'm trying to show blocks of
scheduled time on the report, and as I stated before it works fine on
my
laptop, I can't get it to work at work) When I add a block beyond the
first
4 blocks then all five blocks show #. When I remove the 5th block,
then
the
first four work again.
 
I'm not sure what you mean by modifying the left and width of the control (I
know how to do that, I don't understand why you want me to do that). I am
using one control for each 15minute segment of time between 6am and 8pm. I
don't know how you could condense that to 5 controls, if I combine data into
one control than I won't get the detail I need.

Duane Hookom said:
There is a calendar report that presents information like this that uses
about 5 controls in the detail section. Rather than using lots of controls,
I would suggest that you modify the Left and Width properties of a control
to display your information.

I have no idea why your current solution doesn't work but I would concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

tw said:
thanks, but access won't open the download do to security issues, and I
don't
know away around it. however my design more closely resembles what my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a bargraph
The report looks great on my system. I just need it to work at work.


Duane Hookom said:
This won't resolve your current issue but if you are looking for a report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked perfectly.
I
then updated my development system at work (Access2002) When I tried to
preview the report from design view it would flash a blank report
window
for
a sec then return to design view. When I ran the code that calls the
report,
I got an error saying that the page it was trying to access didn't
exist.
I
tried to get around that by creating a new report in design view and
copying
the fields from the report that I had created at home. The same thing
happened from design view, but from the code that called the report, I
got
the error message property does not exist. I then deleted the report I
just
created and started again. This time only copying a few fields at a
time
and
testing to find the problem field. I get all of the lables copied with
no
problems. I get a few of the data fields copied before it has a
problem.
So
I deleted the data fields that I copied and am trying to recreate those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are small
text
boxes that I have a similar statemtent in (just the condition fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3, X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments between 6am
and
8pm. I have conditional formatting on each on of these fields to set
the
foreground and background color to the same color (A different yellow
tint
for each of the 4 blocks in each hour). I'm trying to show blocks of
scheduled time on the report, and as I stated before it works fine on
my
laptop, I can't get it to work at work) When I add a block beyond the
first
4 blocks then all five blocks show #. When I remove the 5th block,
then
the
first four work again.
 
I have narrowed it down to the conditional formatting. I have successfully
put back all the controls by removing the conditional formatting. I ran the
report, and it worked. I then tried to put back the formatting and it did
the same as before. Could it be a memory or other issue unrelated to access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in this case)

tw said:
I'm not sure what you mean by modifying the left and width of the control (I
know how to do that, I don't understand why you want me to do that). I am
using one control for each 15minute segment of time between 6am and 8pm. I
don't know how you could condense that to 5 controls, if I combine data into
one control than I won't get the detail I need.

Duane Hookom said:
There is a calendar report that presents information like this that uses
about 5 controls in the detail section. Rather than using lots of controls,
I would suggest that you modify the Left and Width properties of a control
to display your information.

I have no idea why your current solution doesn't work but I would concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

tw said:
thanks, but access won't open the download do to security issues, and I
don't
know away around it. however my design more closely resembles what my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a bargraph
The report looks great on my system. I just need it to work at work.


:

This won't resolve your current issue but if you are looking for a report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked perfectly.
I
then updated my development system at work (Access2002) When I tried to
preview the report from design view it would flash a blank report
window
for
a sec then return to design view. When I ran the code that calls the
report,
I got an error saying that the page it was trying to access didn't
exist.
I
tried to get around that by creating a new report in design view and
copying
the fields from the report that I had created at home. The same thing
happened from design view, but from the code that called the report, I
got
the error message property does not exist. I then deleted the report I
just
created and started again. This time only copying a few fields at a
time
and
testing to find the problem field. I get all of the lables copied with
no
problems. I get a few of the data fields copied before it has a
problem.
So
I deleted the data fields that I copied and am trying to recreate those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are small
text
boxes that I have a similar statemtent in (just the condition fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3, X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments between 6am
and
8pm. I have conditional formatting on each on of these fields to set
the
foreground and background color to the same color (A different yellow
tint
for each of the 4 blocks in each hour). I'm trying to show blocks of
scheduled time on the report, and as I stated before it works fine on
my
laptop, I can't get it to work at work) When I add a block beyond the
first
4 blocks then all five blocks show #. When I remove the 5th block,
then
the
first four work again.
 
You could skip the conditional formatting and go back to the old way of
using code in the On Format event of the section containing the controls.

--
Duane Hookom
MS Access MVP


tw said:
I have narrowed it down to the conditional formatting. I have successfully
put back all the controls by removing the conditional formatting. I ran
the
report, and it worked. I then tried to put back the formatting and it did
the same as before. Could it be a memory or other issue unrelated to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in this
case)

tw said:
I'm not sure what you mean by modifying the left and width of the control
(I
know how to do that, I don't understand why you want me to do that). I
am
using one control for each 15minute segment of time between 6am and 8pm.
I
don't know how you could condense that to 5 controls, if I combine data
into
one control than I won't get the detail I need.

Duane Hookom said:
There is a calendar report that presents information like this that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security issues, and
I
don't
know away around it. however my design more closely resembles what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at work.


:

This won't resolve your current issue but if you are looking for a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When I
tried to
preview the report from design view it would flash a blank report
window
for
a sec then return to design view. When I ran the code that calls
the
report,
I got an error saying that the page it was trying to access didn't
exist.
I
tried to get around that by creating a new report in design view
and
copying
the fields from the report that I had created at home. The same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted the
report I
just
created and started again. This time only copying a few fields at
a
time
and
testing to find the problem field. I get all of the lables copied
with
no
problems. I get a few of the data fields copied before it has a
problem.
So
I deleted the data fields that I copied and am trying to recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are
small
text
boxes that I have a similar statemtent in (just the condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these fields to
set
the
foreground and background color to the same color (A different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show blocks
of
scheduled time on the report, and as I stated before it works fine
on
my
laptop, I can't get it to work at work) When I add a block beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
I've been using access for about two months. I have a fox pro background.
How is the "old way" done?

Thanks.

Duane Hookom said:
You could skip the conditional formatting and go back to the old way of
using code in the On Format event of the section containing the controls.

--
Duane Hookom
MS Access MVP


tw said:
I have narrowed it down to the conditional formatting. I have successfully
put back all the controls by removing the conditional formatting. I ran
the
report, and it worked. I then tried to put back the formatting and it did
the same as before. Could it be a memory or other issue unrelated to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in this
case)

tw said:
I'm not sure what you mean by modifying the left and width of the control
(I
know how to do that, I don't understand why you want me to do that). I
am
using one control for each 15minute segment of time between 6am and 8pm.
I
don't know how you could condense that to 5 controls, if I combine data
into
one control than I won't get the detail I need.

:

There is a calendar report that presents information like this that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security issues, and
I
don't
know away around it. however my design more closely resembles what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at work.


:

This won't resolve your current issue but if you are looking for a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When I
tried to
preview the report from design view it would flash a blank report
window
for
a sec then return to design view. When I ran the code that calls
the
report,
I got an error saying that the page it was trying to access didn't
exist.
I
tried to get around that by creating a new report in design view
and
copying
the fields from the report that I had created at home. The same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted the
report I
just
created and started again. This time only copying a few fields at
a
time
and
testing to find the problem field. I get all of the lables copied
with
no
problems. I get a few of the data fields copied before it has a
problem.
So
I deleted the data fields that I copied and am trying to recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are
small
text
boxes that I have a similar statemtent in (just the condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2, X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these fields to
set
the
foreground and background color to the same color (A different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show blocks
of
scheduled time on the report, and as I stated before it works fine
on
my
laptop, I can't get it to work at work) When I add a block beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
You can use code in the On Format event of the section of the report
containing the controls like:

If Me.[field value] = "X" then
Me.[Field Value].ForeColor = vbYellow
Me.[Field Value].BackColor = vbYellow
Else
Me.[Field Value].ForeColor = vbBlack
Me.[Field Value].BackColor = vbWhite
End IF

If you have lots of controls that you want to run the same code, then you
might make sure the names of your controls are predictable and write code to
loop through the named controls.

--
Duane Hookom
MS Access MVP


tw said:
I've been using access for about two months. I have a fox pro background.
How is the "old way" done?

Thanks.

Duane Hookom said:
You could skip the conditional formatting and go back to the old way of
using code in the On Format event of the section containing the controls.

--
Duane Hookom
MS Access MVP


tw said:
I have narrowed it down to the conditional formatting. I have
successfully
put back all the controls by removing the conditional formatting. I
ran
the
report, and it worked. I then tried to put back the formatting and it
did
the same as before. Could it be a memory or other issue unrelated to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in this
case)

:

I'm not sure what you mean by modifying the left and width of the
control
(I
know how to do that, I don't understand why you want me to do that).
I
am
using one control for each 15minute segment of time between 6am and
8pm.
I
don't know how you could condense that to 5 controls, if I combine
data
into
one control than I won't get the detail I need.

:

There is a calendar report that presents information like this that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security issues,
and
I
don't
know away around it. however my design more closely resembles
what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at
work.


:

This won't resolve your current issue but if you are looking for
a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When I
tried to
preview the report from design view it would flash a blank
report
window
for
a sec then return to design view. When I ran the code that
calls
the
report,
I got an error saying that the page it was trying to access
didn't
exist.
I
tried to get around that by creating a new report in design
view
and
copying
the fields from the report that I had created at home. The
same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted the
report I
just
created and started again. This time only copying a few fields
at
a
time
and
testing to find the problem field. I get all of the lables
copied
with
no
problems. I get a few of the data fields copied before it has
a
problem.
So
I deleted the data fields that I copied and am trying to
recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are
small
text
boxes that I have a similar statemtent in (just the condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2,
X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these fields
to
set
the
foreground and background color to the same color (A different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show
blocks
of
scheduled time on the report, and as I stated before it works
fine
on
my
laptop, I can't get it to work at work) When I add a block
beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
One more question and I think I'll have it. In fox pro I'd use the & key to
reference the field name in a variable as you are suggestion. How would I do
that in Access in a loop

for i = 1 to 56
fieldname = "txtField" + str(i) + ".forcolor"
&fieldname = vbYellow
next

this would assign txtfield1, txtfield2 ... throughout the loop
txtfield1 is the fieldname
&fieldname = vbYellow would assign the value of var vbYellow to var
txtfield1.forecolor


exactly how would I do that in access vb code?

Duane Hookom said:
You can use code in the On Format event of the section of the report
containing the controls like:

If Me.[field value] = "X" then
Me.[Field Value].ForeColor = vbYellow
Me.[Field Value].BackColor = vbYellow
Else
Me.[Field Value].ForeColor = vbBlack
Me.[Field Value].BackColor = vbWhite
End IF

If you have lots of controls that you want to run the same code, then you
might make sure the names of your controls are predictable and write code to
loop through the named controls.

--
Duane Hookom
MS Access MVP


tw said:
I've been using access for about two months. I have a fox pro background.
How is the "old way" done?

Thanks.

Duane Hookom said:
You could skip the conditional formatting and go back to the old way of
using code in the On Format event of the section containing the controls.

--
Duane Hookom
MS Access MVP


I have narrowed it down to the conditional formatting. I have
successfully
put back all the controls by removing the conditional formatting. I
ran
the
report, and it worked. I then tried to put back the formatting and it
did
the same as before. Could it be a memory or other issue unrelated to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in this
case)

:

I'm not sure what you mean by modifying the left and width of the
control
(I
know how to do that, I don't understand why you want me to do that).
I
am
using one control for each 15minute segment of time between 6am and
8pm.
I
don't know how you could condense that to 5 controls, if I combine
data
into
one control than I won't get the detail I need.

:

There is a calendar report that presents information like this that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security issues,
and
I
don't
know away around it. however my design more closely resembles
what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at
work.


:

This won't resolve your current issue but if you are looking for
a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When I
tried to
preview the report from design view it would flash a blank
report
window
for
a sec then return to design view. When I ran the code that
calls
the
report,
I got an error saying that the page it was trying to access
didn't
exist.
I
tried to get around that by creating a new report in design
view
and
copying
the fields from the report that I had created at home. The
same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted the
report I
just
created and started again. This time only copying a few fields
at
a
time
and
testing to find the problem field. I get all of the lables
copied
with
no
problems. I get a few of the data fields copied before it has
a
problem.
So
I deleted the data fields that I copied and am trying to
recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are
small
text
boxes that I have a similar statemtent in (just the condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2,
X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these fields
to
set
the
foreground and background color to the same color (A different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show
blocks
of
scheduled time on the report, and as I stated before it works
fine
on
my
laptop, I can't get it to work at work) When I add a block
beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
I may need more help than just one answer. I put some code in the format
event of the detail band of the report and put a break in the code so that I
could step through it, and the code never fired. Is there something that has
to trigger the format event code to run?

tw said:
One more question and I think I'll have it. In fox pro I'd use the & key to
reference the field name in a variable as you are suggestion. How would I do
that in Access in a loop

for i = 1 to 56
fieldname = "txtField" + str(i) + ".forcolor"
&fieldname = vbYellow
next

this would assign txtfield1, txtfield2 ... throughout the loop
txtfield1 is the fieldname
&fieldname = vbYellow would assign the value of var vbYellow to var
txtfield1.forecolor


exactly how would I do that in access vb code?

Duane Hookom said:
You can use code in the On Format event of the section of the report
containing the controls like:

If Me.[field value] = "X" then
Me.[Field Value].ForeColor = vbYellow
Me.[Field Value].BackColor = vbYellow
Else
Me.[Field Value].ForeColor = vbBlack
Me.[Field Value].BackColor = vbWhite
End IF

If you have lots of controls that you want to run the same code, then you
might make sure the names of your controls are predictable and write code to
loop through the named controls.

--
Duane Hookom
MS Access MVP


tw said:
I've been using access for about two months. I have a fox pro background.
How is the "old way" done?

Thanks.

:

You could skip the conditional formatting and go back to the old way of
using code in the On Format event of the section containing the controls.

--
Duane Hookom
MS Access MVP


I have narrowed it down to the conditional formatting. I have
successfully
put back all the controls by removing the conditional formatting. I
ran
the
report, and it worked. I then tried to put back the formatting and it
did
the same as before. Could it be a memory or other issue unrelated to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in this
case)

:

I'm not sure what you mean by modifying the left and width of the
control
(I
know how to do that, I don't understand why you want me to do that).
I
am
using one control for each 15minute segment of time between 6am and
8pm.
I
don't know how you could condense that to 5 controls, if I combine
data
into
one control than I won't get the detail I need.

:

There is a calendar report that presents information like this that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security issues,
and
I
don't
know away around it. however my design more closely resembles
what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at
work.


:

This won't resolve your current issue but if you are looking for
a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When I
tried to
preview the report from design view it would flash a blank
report
window
for
a sec then return to design view. When I ran the code that
calls
the
report,
I got an error saying that the page it was trying to access
didn't
exist.
I
tried to get around that by creating a new report in design
view
and
copying
the fields from the report that I had created at home. The
same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted the
report I
just
created and started again. This time only copying a few fields
at
a
time
and
testing to find the problem field. I get all of the lables
copied
with
no
problems. I get a few of the data fields copied before it has
a
problem.
So
I deleted the data fields that I copied and am trying to
recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them are
small
text
boxes that I have a similar statemtent in (just the condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2,
X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these fields
to
set
the
foreground and background color to the same color (A different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show
blocks
of
scheduled time on the report, and as I stated before it works
fine
on
my
laptop, I can't get it to work at work) When I add a block
beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
You are catching on
Dim Ctl as Control
For i = 1 to 56
Set Ctl = Me("txtField" & i)
If Ctl.Value = .... Then
Ctl.ForeColor = ....
Ctl.BackColor = ....
Else
Ctl.ForeColor = ....
Ctl.BackColor = ....
End If
Next

Breakpoints should work. Have you compiled your code?

--
Duane Hookom
MS Access MVP
--

tw said:
One more question and I think I'll have it. In fox pro I'd use the & key
to
reference the field name in a variable as you are suggestion. How would I
do
that in Access in a loop

for i = 1 to 56
fieldname = "txtField" + str(i) + ".forcolor"
&fieldname = vbYellow
next

this would assign txtfield1, txtfield2 ... throughout the loop
txtfield1 is the fieldname
&fieldname = vbYellow would assign the value of var vbYellow to var
txtfield1.forecolor


exactly how would I do that in access vb code?

Duane Hookom said:
You can use code in the On Format event of the section of the report
containing the controls like:

If Me.[field value] = "X" then
Me.[Field Value].ForeColor = vbYellow
Me.[Field Value].BackColor = vbYellow
Else
Me.[Field Value].ForeColor = vbBlack
Me.[Field Value].BackColor = vbWhite
End IF

If you have lots of controls that you want to run the same code, then you
might make sure the names of your controls are predictable and write code
to
loop through the named controls.

--
Duane Hookom
MS Access MVP


tw said:
I've been using access for about two months. I have a fox pro
background.
How is the "old way" done?

Thanks.

:

You could skip the conditional formatting and go back to the old way
of
using code in the On Format event of the section containing the
controls.

--
Duane Hookom
MS Access MVP


I have narrowed it down to the conditional formatting. I have
successfully
put back all the controls by removing the conditional formatting. I
ran
the
report, and it worked. I then tried to put back the formatting and
it
did
the same as before. Could it be a memory or other issue unrelated
to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in
this
case)

:

I'm not sure what you mean by modifying the left and width of the
control
(I
know how to do that, I don't understand why you want me to do
that).
I
am
using one control for each 15minute segment of time between 6am and
8pm.
I
don't know how you could condense that to 5 controls, if I combine
data
into
one control than I won't get the detail I need.

:

There is a calendar report that presents information like this
that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of
a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security
issues,
and
I
don't
know away around it. however my design more closely resembles
what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at
work.


:

This won't resolve your current issue but if you are looking
for
a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When
I
tried to
preview the report from design view it would flash a blank
report
window
for
a sec then return to design view. When I ran the code that
calls
the
report,
I got an error saying that the page it was trying to access
didn't
exist.
I
tried to get around that by creating a new report in design
view
and
copying
the fields from the report that I had created at home. The
same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted
the
report I
just
created and started again. This time only copying a few
fields
at
a
time
and
testing to find the problem field. I get all of the lables
copied
with
no
problems. I get a few of the data fields copied before it
has
a
problem.
So
I deleted the data fields that I copied and am trying to
recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them
are
small
text
boxes that I have a similar statemtent in (just the
condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2,
X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these
fields
to
set
the
foreground and background color to the same color (A
different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show
blocks
of
scheduled time on the report, and as I stated before it
works
fine
on
my
laptop, I can't get it to work at work) When I add a block
beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
Thanks, I was doing something really stupid. I have two reports with similar
names and I was calling the wrong report. That's why the break didn't work.

I put in the code below and it works perfectly. Thanks for all your help

Duane Hookom said:
You are catching on
Dim Ctl as Control
For i = 1 to 56
Set Ctl = Me("txtField" & i)
If Ctl.Value = .... Then
Ctl.ForeColor = ....
Ctl.BackColor = ....
Else
Ctl.ForeColor = ....
Ctl.BackColor = ....
End If
Next

Breakpoints should work. Have you compiled your code?

--
Duane Hookom
MS Access MVP
--

tw said:
One more question and I think I'll have it. In fox pro I'd use the & key
to
reference the field name in a variable as you are suggestion. How would I
do
that in Access in a loop

for i = 1 to 56
fieldname = "txtField" + str(i) + ".forcolor"
&fieldname = vbYellow
next

this would assign txtfield1, txtfield2 ... throughout the loop
txtfield1 is the fieldname
&fieldname = vbYellow would assign the value of var vbYellow to var
txtfield1.forecolor


exactly how would I do that in access vb code?

Duane Hookom said:
You can use code in the On Format event of the section of the report
containing the controls like:

If Me.[field value] = "X" then
Me.[Field Value].ForeColor = vbYellow
Me.[Field Value].BackColor = vbYellow
Else
Me.[Field Value].ForeColor = vbBlack
Me.[Field Value].BackColor = vbWhite
End IF

If you have lots of controls that you want to run the same code, then you
might make sure the names of your controls are predictable and write code
to
loop through the named controls.

--
Duane Hookom
MS Access MVP


I've been using access for about two months. I have a fox pro
background.
How is the "old way" done?

Thanks.

:

You could skip the conditional formatting and go back to the old way
of
using code in the On Format event of the section containing the
controls.

--
Duane Hookom
MS Access MVP


I have narrowed it down to the conditional formatting. I have
successfully
put back all the controls by removing the conditional formatting. I
ran
the
report, and it worked. I then tried to put back the formatting and
it
did
the same as before. Could it be a memory or other issue unrelated
to
access?
The code I have in the conditional formatting is
field value | is equal to | "X"
then set the forecolor and backcolor to the same color (yellow in
this
case)

:

I'm not sure what you mean by modifying the left and width of the
control
(I
know how to do that, I don't understand why you want me to do
that).
I
am
using one control for each 15minute segment of time between 6am and
8pm.
I
don't know how you could condense that to 5 controls, if I combine
data
into
one control than I won't get the detail I need.

:

There is a calendar report that presents information like this
that
uses
about 5 controls in the detail section. Rather than using lots of
controls,
I would suggest that you modify the Left and Width properties of
a
control
to display your information.

I have no idea why your current solution doesn't work but I would
concerned
about its reliability.

--
Duane Hookom
MS Access MVP
--

thanks, but access won't open the download do to security
issues,
and
I
don't
know away around it. however my design more closely resembles
what
my
bosses
want.

EmployeeName
Day of Week
6 7 8 9 etc...
client1 XXXXXXXX
client2 XXXXXXXX
etc.

The conditional formatting actually makes the XXXX look like a
bargraph
The report looks great on my system. I just need it to work at
work.


:

This won't resolve your current issue but if you are looking
for
a
report
that displays blocks of time, consider the calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.

--
Duane Hookom
MS Access MVP
--

I created a report on my system at home (Access2003) worked
perfectly.
I
then updated my development system at work (Access2002) When
I
tried to
preview the report from design view it would flash a blank
report
window
for
a sec then return to design view. When I ran the code that
calls
the
report,
I got an error saying that the page it was trying to access
didn't
exist.
I
tried to get around that by creating a new report in design
view
and
copying
the fields from the report that I had created at home. The
same
thing
happened from design view, but from the code that called the
report, I
got
the error message property does not exist. I then deleted
the
report I
just
created and started again. This time only copying a few
fields
at
a
time
and
testing to find the problem field. I get all of the lables
copied
with
no
problems. I get a few of the data fields copied before it
has
a
problem.
So
I deleted the data fields that I copied and am trying to
recreate
those
fields as new fields. I am still having a problem.

The detail of the report has about 58 controls. 56 of them
are
small
text
boxes that I have a similar statemtent in (just the
condition
fieldname
is
changed) iif([X6AM1] = true, "X","") I have 4 each X6AM2,
X6AM3,
X6AM4
from
6AM to 7PM I.E. a field for each of the 15minute increments
between 6am
and
8pm. I have conditional formatting on each on of these
fields
to
set
the
foreground and background color to the same color (A
different
yellow
tint
for each of the 4 blocks in each hour). I'm trying to show
blocks
of
scheduled time on the report, and as I stated before it
works
fine
on
my
laptop, I can't get it to work at work) When I add a block
beyond
the
first
4 blocks then all five blocks show #. When I remove the 5th
block,
then
the
first four work again.
 
Back
Top