name string

D

Dan @BCBS

I don't get what I'm doing wrong.. The first code below works and displays a
message when no data is entered. The second code is where I'm attempting to
put the first and last name in a text box, but I get no data returned...

Works:
=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not Entered")

Don't work:
=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not
Entered",Trim(formatfield([PV_LASTNAME]) & ", " &
formatfield([PV_FIRSTNAME])))
 
O

Ofer Cohen

What is the formatfield function, is it a function you created?
If so, where did you create it?

It need to be either in a module or in the current form where the text box in.
 
D

Dan @BCBS

I have a very large public module which is a mess and I'd like to eliminate
it all together...

Can I merge the First Name and Last Name into this cell if a value was
entered.
I'm pretty sure I did this a long time ago using Trim but I cannot remember
exactally what I did..

Ofer Cohen said:
What is the formatfield function, is it a function you created?
If so, where did you create it?

It need to be either in a module or in the current form where the text box in.

--
Good Luck
BS"D


Dan @BCBS said:
I don't get what I'm doing wrong.. The first code below works and displays a
message when no data is entered. The second code is where I'm attempting to
put the first and last name in a text box, but I get no data returned...

Works:
=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not Entered")

Don't work:
=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not
Entered",Trim(formatfield([PV_LASTNAME]) & ", " &
formatfield([PV_FIRSTNAME])))
 
O

Ofer Cohen

Remove this function name, try

=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not
Entered",[PV_LASTNAME] & (", " + [PV_FIRSTNAME]))


--
Good Luck
BS"D


Dan @BCBS said:
I have a very large public module which is a mess and I'd like to eliminate
it all together...

Can I merge the First Name and Last Name into this cell if a value was
entered.
I'm pretty sure I did this a long time ago using Trim but I cannot remember
exactally what I did..

Ofer Cohen said:
What is the formatfield function, is it a function you created?
If so, where did you create it?

It need to be either in a module or in the current form where the text box in.

--
Good Luck
BS"D


Dan @BCBS said:
I don't get what I'm doing wrong.. The first code below works and displays a
message when no data is entered. The second code is where I'm attempting to
put the first and last name in a text box, but I get no data returned...

Works:
=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not Entered")

Don't work:
=IIf([PV_LASTNAME] Is Null And [PV_FIRSTNAME] Is Null,"Provider Not
Entered",Trim(formatfield([PV_LASTNAME]) & ", " &
formatfield([PV_FIRSTNAME])))
 

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