Record Count

G

Guest

I have a list of people on a continuous form sorted according to the
surnames. On the footer of the form, I have copied the Northwind database
Customer Phone List buttons and macro which, upon pressing a letter button,
filters surnames according to the alphabet.
This macro also checks for the number of records returned with each alphabet
and if there are no records, returns a message and removes the filter.

It works fine but in case there is no record returned, rather than showing
the message, it shows one record with the word Autonumber in the autonumber
field. This one record also shows a comma in the name field. The data source
of the name field is a formula which combines the surname with a comma and
the first name. =[Surname] & ", " & [First Name]

Any sugestions? Thanks in advance.

naqvee
 
A

Allen Browne

Try:
=[Surname] & ", " + [First Name]

That should suppress the comma if First Name is null.
 
G

Guest

Many thanks Allen. Although the comma has disappeared from the name result,
but the main problem still remains. On filtering, with no records existing
for a letter, number of records returned is still not coming as 0. Number of
records being returned is 1 (literally the word autonumber - with all other
fields empty).
 
A

Allen Browne

The navigation buttons on a form or datasheet always display one more than
the number of records when you move into the New Record row.
 

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