Help with VB Access Function for a Report

G

Guest

I need help with conditional formatting in an Access Report. How the
information needs to displays is based on the data in four fields. I have
tried writing a VB function within Access for this; however, I cannot get
past a Null Value error.
The fields are PrimaryFirst, PrimaryLast, SecondaryFirst, SecondaryLast
If SecondaryFirst AND SecondaryLast are Null (no data) than
Name=PrimaryFirst + PrimaryLast
IF PrimaryLast AND SecondaryLast are EQUAL than
Name = PrimaryFirst + “and†+ SecondaryFirst + PrimaryLast
IF PrimaryLast AND SecondaryLast are NOT EQUAL than
Name=PrimaryFirst+PrimaryLast+â€andâ€+SecondaryFirst+SecondaryLast

It is possible that the SecondaryFirst and SecondaryLast fields will be
empty, it is even a remote possibility that the PrimaryFirst field is empty.

Your help is greatly appreciated!
 

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