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!
 
Ad

Advertisements


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

Similar Threads

VB in Access 2
VB Help 3
Controling Microsoft Graph on vb via access report 3
Loss of VB in Access 0
Access 97 VB 1
Access 97 VB 2
Running access from VB 3
VB access to tables collection 1

Top