By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

IIf function problem and serial number for each records on the report

P: n/a
Dear all,

Would you tell me how to solve the following two problems in an access file
upon preparing report form:
a) I have written an IIf function for a string field at the beginning of
group row of a report form as below:

sss is a string field with 2 characters;
the function is = IIf([sss]="1", "yes","no")

Problem: the report only shows the "#~"

If the function is =IIf([sss] Is Null, "yes", "no"), the result is
only showing "yes" for all records.
b) How can I list out the records on the report with serial numbers if
there is serial numbers for the records in the table?
Thank you!!

Peter

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Peter wrote:
a) I have written an IIf function for a string field at the beginning of
group row of a report form as below:
Unless others have figured out exactly what you mean, post your SQL from
your query.

b) How can I list out the records on the report with serial numbers if
there is serial numbers for the records in the table?


What is the structure of the table in question?

--
Tim - http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #2

P: n/a
Dear Tim,

a) I generate a report from a query table, then I want to use this
report
to show the total numbers of the customers who buy the goods. There is a
string field "choose goods" in the table. Such field only contains either
"1" or "". Therefore, I write the IIF function on the report form at the
beginning of group row:

=IIf([choose goods]="1", "No. of customer to buy the goods", "No. of
customer not to buy the goods")

The expressed result is : No. of customer to buy the goods
99999
No. of customer not to buy the
goods 99999

However, the result is "#??" 99999
"#??" 99999
b) I make a mistake on my question. There is NO a field to indicate the
serial number of the records in the original table. As I want to general a
report from a query table under certain conditions, only some records will
be selected. How can I general the serial numbers for each records on the
report, such that:

1 xxxxx xxxxxxx xxxxxx
2 xxxxx xxxxxxx xxxxxx
3 xxxxx xxxxxxx xxxxxx
Nov 13 '05 #3

P: n/a
To question B

My way to do this is to put in the Table a numeric field with name
"DumNr" or so, with only "one" in it, I mean the number 1. DefaultValue
also put to 1.

If you create this field afterwards you could find this action query
useful:

update mytable set dumnr = 1

In a query you have to generate an extra field like this:
dumnr: 1

In any report where I want to number the rows I put a textfield with any
name, the Property ControlSource set to dumnr and the property
RunningSum set to 1 or 2.

1 will restart numbering again and again after every grouping.
2 will number all rows in the report without restarting.

This works in a report. I didn't find a way to do the same in a query

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.