473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

A97 Problem: Aliased fields not available in Detail.Format event

I ran into a weird problem with a subreport with an OnFormat event
of the subreport detail. When I view the field list in report design
view, all the aliased fields in the recordsource are available. But
when the report runs, the aliased fields are inaccessible. Of
course, this is causing a problem with the report running, and I
can't figure it out.

I've decompiled, I've compacted, I've recreated the recordsource.
I've tried moving the field aliasing out of the recordsource and
into source queries. None of these things have made a difference.

The same subreport is running correctly in a different A97 MDB that
has the same basic structure. I assume that one of two things are
happening:

1. either the slight changes I made for the new MDB are causing the
problem somehow, OR

2. one or more of the source queries is not the same as in the
working version (even though I've imported all the source queries
from the working version).

Any ideas? I was intending to roll this out for the client before
noon today, but it's broken now, so I can't. :(

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Apr 18 '06 #1
3 1866
Hi David

Couple of possible issues here.

There is a problem with examining the Controls of a Section of a Report in
Access 97 on Windows XP. The low-down is:
http://support.microsoft.com/kb/278303/en-us

If that is not the issue, you are probably aware that Access has always had
a problem with referring to the fields of the report if they are not
represented by controls on the report. In many circumstances (particulary
where the fields have never been controls, or were added/changed later) the
optimizer seems not to even generate the fields, and so referring to them
generates an error. The workaround is to create controls to bind them to.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
I ran into a weird problem with a subreport with an OnFormat event
of the subreport detail. When I view the field list in report design
view, all the aliased fields in the recordsource are available. But
when the report runs, the aliased fields are inaccessible. Of
course, this is causing a problem with the report running, and I
can't figure it out.

I've decompiled, I've compacted, I've recreated the recordsource.
I've tried moving the field aliasing out of the recordsource and
into source queries. None of these things have made a difference.

The same subreport is running correctly in a different A97 MDB that
has the same basic structure. I assume that one of two things are
happening:

1. either the slight changes I made for the new MDB are causing the
problem somehow, OR

2. one or more of the source queries is not the same as in the
working version (even though I've imported all the source queries
from the working version).

Any ideas? I was intending to roll this out for the client before
noon today, but it's broken now, so I can't. :(

Apr 18 '06 #2
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
Couple of possible issues here.

There is a problem with examining the Controls of a Section of a
Report in Access 97 on Windows XP. The low-down is:
http://support.microsoft.com/kb/278303/en-us
An odd problem, but it occurs on Win2K and WinXP. The article is
unclear about whether it should occur in Win2K.

In any event, I don't see that it has anything to do with it. The
code is this:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!InvoiceNumber = Me!SortInvoice Then
Me!fldInvoiceNumber.TextAlign = 1
Else
Me!fldInvoiceNumber.TextAlign = 3
End If
End Sub

And I'm told that Me!SortInvoice (which is aliased in the form's
recordsource, since it's based on a field called InvoiceNumber in a
different table) does not exist.
If that is not the issue, you are probably aware that Access has
always had a problem with referring to the fields of the report if
they are not represented by controls on the report. In many
circumstances (particulary where the fields have never been
controls, or were added/changed later) the optimizer seems not to
even generate the fields, and so referring to them generates an
error. The workaround is to create controls to bind them to.


I have seen that in A2K, where I frequently have upgraded A97 apps
that then break in A2K. But in all cases, it was references to
fields in the recordsource of a subform from the parent form.

This is a case of a subreport where a field in the subreport's
recordsource is referred to in the OnFormat event of the detail of
itself. And the report runs perfectly in one MDB but breaks in
another, saying it can't find the field.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Apr 18 '06 #3
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
If that is not the issue, you are probably aware that Access has
always had a problem with referring to the fields of the report if
they are not represented by controls on the report. In many
circumstances (particulary where the fields have never been
controls, or were added/changed later) the optimizer seems not to
even generate the fields, and so referring to them generates an
error. The workaround is to create controls to bind them to.


Well, that actually worked. I've never encountered this problem in
A97 before, and never in any version of Access when the reference is
within a single report (rather than between parent and child or vice
versa).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Apr 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Evil | last post by:
This is likely a very simple question, but one which is leaving me a bit confused. i have an image control on a report in Access97 then in the Detail's ON FORMAT Event, i have: Private Sub...
3
by: CSDunn | last post by:
Hello, I have a situation in which each record on a report has 40 fields, any one of which can contain a value of 'C', or 'I', or 'B'. I need to create one calculated field on the report that will...
6
by: William Bradley | last post by:
I have a production table and its accompanying form. There can be up to ten ingredients in what is produced. The ingredients are obtained from the incoming goods table which supplies the two...
1
by: Tom | last post by:
In the Developers Handbook, Getz provides a way to create a survey report that displays either a line, Yes/No or multiple choice for each question. It's done by placing three controls (one for each...
2
by: Jozef | last post by:
Hello, I have a report that contains a memo field that can contain quite a bit of information. There are actually a couple of fields like this. When I use can grow / can shrink, the report...
12
by: uarana | last post by:
Hi All, Just a quick question please. I have a report that feeds off a query relating to all processed jobs. One of the fileds in the query is the current status of the Job. The job can either...
4
by: Debbiedo | last post by:
I searched the groups and tried several approaches but still cannot find a solution. I have a table that has several hundred fields that may or may not need to be displayed in a report,...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
5
by: cyberdwarf | last post by:
Hi, I have a report with a repeating detail section, containing a text field (which can grow), plus three more text fields, which cannot grow. These fields are horizontally aligned. This...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.