When i close the form, If the company Name field is 'empty' then fill it in with the First and Last name.
i would think it would be something like this?
If Null Me![CompanyName] then
Me![CompanyName] = Me![FirstName] &" "& Me![LastName]
End If
When i close the form, If the company Name field is 'empty' then fill it in with the First and Last name.
i would think it would be something like this?
If Null Me![CompanyName] then
Me![CompanyName] = Me![FirstName] &" "& Me![LastName]
End If
If IsNull(Me!CompanyName) Then
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
You could use the IsNull() function and also check for an empty string ...
Another approach may be to look for something greater than an empty string. You might want to test the following ...Code:If IsNull(Me![CompanyName]) or Me![CompanyName] = "" then Me![CompanyName] = Me![FirstName] & " " & Me![LastName] End If
Code:If Me![CompanyName] > "" then else Me![CompanyName] = Me![FirstName] & " " & Me![LastName] End If
Does this look correct?
If IsNull (Me!CompanyName) Then
Me![CompanyName] = Me![FirstName] & " " & Me![LastName]
End If