Calling Field Values

Little_Man22

Registered User.
Local time
Today, 12:21
Joined
Jun 23, 2001
Messages
118
Hi,

I have a pop-up form and call field values from another form using statements like the following under the default value of the field where I want the data to go:

Forms!frmClients!Agent1!

This works great, however, if there is nothing in the origional field then it plugs a '0' into the field on my pop-up form. How can I get around this?

Ryan.
 
Maybe you can try the IIf function. This lets you nominate the value you want if the field you are calling is null. Have a look at IIf in Access Help. It covers the IIf function prettly well.

Cheers
Steve
smile.gif
 
Sorry SteveA...it doesn't seem like that will do it...I played around with a coupld of strings but it's not working.

Does anyone else have any ideas?

Also, my next question is how to copy data from one field to another. Basically, on this pop-up form that I have if data is entered into field 'x' I need some kind of VB code in the afterupdate event procedure that will copy it to field 'y'. Does anyone know what this code would look like?

Ryan.
 
Instead of checking if the fields are null, sometimes it's better to use the LEN function and check if the length is equal to 0.
 
Chris RR: How would I go about doing that?

(i.e.) what would the code look like?
 

Users who are viewing this thread

Back
Top Bottom