A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

textbox content not visible...



 
 
Thread Tools Display Modes
  #1  
Old December 1st, 2007, 03:54 PM posted to microsoft.public.access.reports
Arto
external usenet poster
 
Posts: 6
Default textbox content not visible...

Hi,

I use "Createreportcontrol " to set the number of text boxes i need in
report template I've created earlier.
Then, in preview mode I populate the newly created textboxes by setting the
..value property for each of them.
This worked fine with computer I wrote the code, the preview looked nice and
they printed out just fine.

Now, I opened this same project in another computer, with A2007. The report
stopped working. It creates the textboxes and does not give any error
messages, but the textboxes seem to be empty?!

I have no idea from where to look for solutions. Is it some property
settings? some new feature in 2007 version? is it related to printer driver?
  #2  
Old December 1st, 2007, 05:02 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default textbox content not visible...

arto wrote:
I use "Createreportcontrol " to set the number of text boxes i need in
report template I've created earlier.
Then, in preview mode I populate the newly created textboxes by setting the
.value property for each of them.
This worked fine with computer I wrote the code, the preview looked nice and
they printed out just fine.

Now, I opened this same project in another computer, with A2007. The report
stopped working. It creates the textboxes and does not give any error
messages, but the textboxes seem to be empty?!

I have no idea from where to look for solutions. Is it some property
settings? some new feature in 2007 version? is it related to printer driver?



Probably some new security feature telling you that it is a
bad practice to make design changes in a running
application. This has always been a bad idea, but to
persist in presence of increased security, you will have to
bend over backwards.

The CreateControl method is only provide so you can create
your own design time wizard like procedures. It was never
intended to be used in a distributed program.

The tried and true approach has always been to precreate as
many or more invisible controls as you will ever need and
just make them visible as needed at run time.

I might be able to make more specific suggestions of you'll
explain what you are tring to accomplish.

--
Marsh
MVP [MS Access]
  #3  
Old December 3rd, 2007, 05:38 PM posted to microsoft.public.access.reports
Arto
external usenet poster
 
Posts: 6
Default textbox content not visible...

Thanks for your input!

The report is actually invoice print-out (or order confirmation or shipping
list). There are some customer related header information and the order
lines, which number varies.
Then, I need also a summary at the end of the order lines (not in footer,
though), having total value, tax, the usual stuff. This summary has different
'layout' than the order lines and it's location changes, depending on the
number of lines...

Thinking you comments, perhaps I could use list box to show the order lines
and then couple of text boxes having the summary information. I just need to
set the location of the summary boxes, depending the order line qty...
  #4  
Old December 3rd, 2007, 07:06 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default textbox content not visible...

arto wrote:
The report is actually invoice print-out (or order confirmation or shipping
list). There are some customer related header information and the order
lines, which number varies.
Then, I need also a summary at the end of the order lines (not in footer,
though), having total value, tax, the usual stuff. This summary has different
'layout' than the order lines and it's location changes, depending on the
number of lines...

Thinking you comments, perhaps I could use list box to show the order lines
and then couple of text boxes having the summary information. I just need to
set the location of the summary boxes, depending the order line qty...



What you are describing is a fairly standard report. The
report would have a group for the Customer field with the
customer info in the group header section and any customer
totals in the group footer. Another group for the Invoice
Number field would display the invoice info in this group
header section and the invoice totals in this group's
footer.

The Invoice detail info would be displayed in the report's
Detail section.

With that kind of report structure, there is no need to
create control's on the fly. The only thing you need to do
to get going is to create the report's record source query
that includes all the required data by joining the
appropriate tables. The report's data can be filtered to a
specific customer or a single invoice by using the Open
report method's WhereCondition argument in the click event
of a form button.

--
Marsh
MVP [MS Access]
  #5  
Old December 6th, 2007, 06:57 PM posted to microsoft.public.access.reports
Arto
external usenet poster
 
Posts: 6
Default textbox content not visible...

With group footer I was able to put together the invoice summary nicely. And
I changed all the textboxes to labels, which seem to work better in report
open event.

So now the challenge is to get the actual details section work properly. I
have the query having all the column information in fields and all the rows
in records. What would be the correct way of presenting these lines?

I am testing the listbox to view these, but it messes things up when there
are more lines than what would fit on one page. In this case the first page
details is empty, the actual data starts from second page and on third page
the listbox goes over the page header...
  #6  
Old December 6th, 2007, 07:17 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default textbox content not visible...

arto wrote:

With group footer I was able to put together the invoice summary nicely. And
I changed all the textboxes to labels, which seem to work better in report
open event.

So now the challenge is to get the actual details section work properly. I
have the query having all the column information in fields and all the rows
in records. What would be the correct way of presenting these lines?

I am testing the listbox to view these, but it messes things up when there
are more lines than what would fit on one page. In this case the first page
details is empty, the actual data starts from second page and on third page
the listbox goes over the page header...



A list box is rarely useful in a report. Just add a bound
text box for each invoice detail field that you want to show
in the detail section. The detail section will
automatically repeat for each record in the record source
query.

--
Marsh
MVP [MS Access]
  #7  
Old December 8th, 2007, 12:58 PM posted to microsoft.public.access.reports
Arto
external usenet poster
 
Posts: 6
Default textbox content not visible...



"Marshall Barton" wrote:

A list box is rarely useful in a report. Just add a bound
text box for each invoice detail field that you want to show
in the detail section. The detail section will
automatically repeat for each record in the record source
query.


Back to basics... or actually first time to basics...

I tried out this report details feature with sample project and I think I
got some idea how to use bond text boxes.

But still, this is something I tried out. I do not understand why the
"WHERE" clause does not work. It puts out dialog asking parameter value for
the textbox0 content.

--------
Private Sub Cmdbutton0_Click()
Dim strtemp As String

DoCmd.OpenReport "raportti1", acDesign
strtemp = "SELECT table1.lines, table1.data " _
& "FROM Table1 " _
& "WHERE (((Table1.lines)=" _
& Me!Txtbox0.Value & "));"

Reports!Raportti1.RecordSource = strtemp

DoCmd.OpenReport "raportti1", acPreview
End Sub
--------
  #8  
Old December 8th, 2007, 04:49 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default textbox content not visible...

arto wrote:
"Marshall Barton" wrote:

A list box is rarely useful in a report. Just add a bound
text box for each invoice detail field that you want to show
in the detail section. The detail section will
automatically repeat for each record in the record source
query.


Back to basics... or actually first time to basics...

I tried out this report details feature with sample project and I think I
got some idea how to use bond text boxes.

But still, this is something I tried out. I do not understand why the
"WHERE" clause does not work. It puts out dialog asking parameter value for
the textbox0 content.

--------
Private Sub Cmdbutton0_Click()
Dim strtemp As String

DoCmd.OpenReport "raportti1", acDesign
strtemp = "SELECT table1.lines, table1.data " _
& "FROM Table1 " _
& "WHERE (((Table1.lines)=" _
& Me!Txtbox0.Value & "));"

Reports!Raportti1.RecordSource = strtemp

DoCmd.OpenReport "raportti1", acPreview
End Sub
--------


Whoa there! That is NOT how you should do that.
You should never modify a form or report's design in a
running application.

If all you are trying to do is filter the report's data,
then preset the record source to a query that selects the
desired fields, but without the criteria. Then use the
OpenReport method's WhereCondition argument to filter the
records.

Assuming the Lines field in the table is a numeric type, the
button code would simply be:

Private Sub Cmdbutton0_Click()
Dim strWhere As String

strWhere = "Lines=" & Me!Txtbox0
DoCmd.OpenReport "raportti1", acPreview, , strWhere
End Sub

--
Marsh
MVP [MS Access]
  #9  
Old December 8th, 2007, 06:36 PM posted to microsoft.public.access.reports
Arto
external usenet poster
 
Posts: 6
Default textbox content not visible...

Thanks!

Now it works perfectly!! I was totally lost with these reports and already
thought I can scrap my fine order handling forms ( which are probably quite
terribly coded, but atleast they work

Arto
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.