An extra Row Source Field needed

B

Bob V

SELECT tblOwnerInfo.OwnerID,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName & ' ')
& IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName & '
') AS OwnerName FROM tblOwnerInfo ORDER BY
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName & ' ')
& IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName & '
');

If tblOwnerInfo.Email has some value in it, add "@" After
tblOwnerInfo.OwnerLastName

ie Gates @ Bill
Thanks for any help...........Bob
 
G

Guest

Hi Bob

Are you trying to create e mail address'. If so add a new field to the
table called NewFieldName (or something else). If not then ignor this and
post a bit more information about what you're trying to get. :)

Create a new Update Query and use this

UPDATE tblOwnerInfo SET tblOwnerInfo.NewFieldName = "MailTo:" &
tblOwnerInfo!OwnerLastName & "@" & tblOwnerInfo!EMail
WHERE ((Not (tblOwnerInfo.EMail) Is Null));

Just an idea and it seems to do what you want a little easier.
 
B

Bob V

Sorry Wayne I am just trying to create an icon next to there name so as I
know I can email there account as I have a email address form them, I cant
have an icon so I thought "@" this might be ok
Thanks for the help.Bob
 
B

Bob V

Wayne, I've created a new query, OwnerID,Email
What function do I need in my 3rd field EmailAlert so as if OwnerID has a
value in Email, EmailAlert will show "@"
Thanks Bob
 
G

Guest

Hi Bob

I wouldn't bother. You can simply use an unbound text box on your form like

=IIf(Not IsNull([EMailField]),"@")

Or, I would normally use something a user can understand better like

=IIf(Not IsNull([EMailField]),"E Mail Available")
 
G

Guest

Sorry Bob just read the query question.

Create a calculated column in the query with something like this

EMailAvail: IIf(Not [TableName]![EMailField] Is Null,"@")
 
B

Bob V

Thanks Wayne, I've been thinking and created a Check Box on my form then
coded it:
Private Sub Form_Current()
If Me.Email = "*@" Then
Me.ckbEmailAlert = -1
Else
Me.ckbEmailAlert = 0

End If
End Sub
So as I can maybe format (Darker Font) my list box to show which Client has
email address's
As you can see the "*@*" does not work but could not think of another way to
get the check box to change with an email address?
Thanks Bob

Wayne-I-M said:
Hi Bob

I wouldn't bother. You can simply use an unbound text box on your form
like

=IIf(Not IsNull([EMailField]),"@")

Or, I would normally use something a user can understand better like

=IIf(Not IsNull([EMailField]),"E Mail Available")





--
Wayne
Manchester, England.



Bob V said:
Sorry Wayne I am just trying to create an icon next to there name so as I
know I can email there account as I have a email address form them, I
cant
have an icon so I thought "@" this might be ok
Thanks for the help.Bob
 
G

Guest

Private Sub Form_Current()
If IsNull([Me.Email]) Then
Me.ckbEmailAlert = 0
Else
Me.ckbEmailAlert = -1
End If
End Sub


--
Wayne
Manchester, England.



Bob V said:
Thanks Wayne, I've been thinking and created a Check Box on my form then
coded it:
Private Sub Form_Current()
If Me.Email = "*@" Then
Me.ckbEmailAlert = -1
Else
Me.ckbEmailAlert = 0

End If
End Sub
So as I can maybe format (Darker Font) my list box to show which Client has
email address's
As you can see the "*@*" does not work but could not think of another way to
get the check box to change with an email address?
Thanks Bob

Wayne-I-M said:
Hi Bob

I wouldn't bother. You can simply use an unbound text box on your form
like

=IIf(Not IsNull([EMailField]),"@")

Or, I would normally use something a user can understand better like

=IIf(Not IsNull([EMailField]),"E Mail Available")





--
Wayne
Manchester, England.



Bob V said:
Sorry Wayne I am just trying to create an icon next to there name so as I
know I can email there account as I have a email address form them, I
cant
have an icon so I thought "@" this might be ok
Thanks for the help.Bob

Hi Bob

Are you trying to create e mail address'. If so add a new field to the
table called NewFieldName (or something else). If not then ignor this
and
post a bit more information about what you're trying to get. :)

Create a new Update Query and use this

UPDATE tblOwnerInfo SET tblOwnerInfo.NewFieldName = "MailTo:" &
tblOwnerInfo!OwnerLastName & "@" & tblOwnerInfo!EMail
WHERE ((Not (tblOwnerInfo.EMail) Is Null));

Just an idea and it seems to do what you want a little easier.


--
Wayne
Manchester, England.



:



SELECT tblOwnerInfo.OwnerID,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName &
'
')
&
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName
& '
') AS OwnerName FROM tblOwnerInfo ORDER BY
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName &
'
')
&
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName
& '
');

If tblOwnerInfo.Email has some value in it, add "@" After
tblOwnerInfo.OwnerLastName

ie Gates @ Bill
Thanks for any help...........Bob
 
B

Bob V

Wayne getting a yellow line error on
If IsNull([Me.Email]) Then
Thanks Bob

Wayne-I-M said:
Private Sub Form_Current()
If IsNull([Me.Email]) Then
Me.ckbEmailAlert = 0
Else
Me.ckbEmailAlert = -1
End If
End Sub


--
Wayne
Manchester, England.



Bob V said:
Thanks Wayne, I've been thinking and created a Check Box on my form then
coded it:
Private Sub Form_Current()
If Me.Email = "*@" Then
Me.ckbEmailAlert = -1
Else
Me.ckbEmailAlert = 0

End If
End Sub
So as I can maybe format (Darker Font) my list box to show which Client
has
email address's
As you can see the "*@*" does not work but could not think of another way
to
get the check box to change with an email address?
Thanks Bob

Wayne-I-M said:
Hi Bob

I wouldn't bother. You can simply use an unbound text box on your form
like

=IIf(Not IsNull([EMailField]),"@")

Or, I would normally use something a user can understand better like

=IIf(Not IsNull([EMailField]),"E Mail Available")





--
Wayne
Manchester, England.



:

Sorry Wayne I am just trying to create an icon next to there name so
as I
know I can email there account as I have a email address form them, I
cant
have an icon so I thought "@" this might be ok
Thanks for the help.Bob

Hi Bob

Are you trying to create e mail address'. If so add a new field to
the
table called NewFieldName (or something else). If not then ignor
this
and
post a bit more information about what you're trying to get. :)

Create a new Update Query and use this

UPDATE tblOwnerInfo SET tblOwnerInfo.NewFieldName = "MailTo:" &
tblOwnerInfo!OwnerLastName & "@" & tblOwnerInfo!EMail
WHERE ((Not (tblOwnerInfo.EMail) Is Null));

Just an idea and it seems to do what you want a little easier.


--
Wayne
Manchester, England.



:



SELECT tblOwnerInfo.OwnerID,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName
&
'
')
&
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName
& '
') AS OwnerName FROM tblOwnerInfo ORDER BY
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName
&
'
')
&
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName
& '
');

If tblOwnerInfo.Email has some value in it, add "@" After
tblOwnerInfo.OwnerLastName

ie Gates @ Bill
Thanks for any help...........Bob
 
B

Bob V

Oops Sorry Wayne got it No [ ]
Thanks Wayne brilliant now im going to try formatting my list box
hmmmmm........Thanks Bob

Wayne-I-M said:
Private Sub Form_Current()
If IsNull([Me.Email]) Then
Me.ckbEmailAlert = 0
Else
Me.ckbEmailAlert = -1
End If
End Sub


--
Wayne
Manchester, England.



Bob V said:
Thanks Wayne, I've been thinking and created a Check Box on my form then
coded it:
Private Sub Form_Current()
If Me.Email = "*@" Then
Me.ckbEmailAlert = -1
Else
Me.ckbEmailAlert = 0

End If
End Sub
So as I can maybe format (Darker Font) my list box to show which Client
has
email address's
As you can see the "*@*" does not work but could not think of another way
to
get the check box to change with an email address?
Thanks Bob

Wayne-I-M said:
Hi Bob

I wouldn't bother. You can simply use an unbound text box on your form
like

=IIf(Not IsNull([EMailField]),"@")

Or, I would normally use something a user can understand better like

=IIf(Not IsNull([EMailField]),"E Mail Available")





--
Wayne
Manchester, England.



:

Sorry Wayne I am just trying to create an icon next to there name so
as I
know I can email there account as I have a email address form them, I
cant
have an icon so I thought "@" this might be ok
Thanks for the help.Bob

Hi Bob

Are you trying to create e mail address'. If so add a new field to
the
table called NewFieldName (or something else). If not then ignor
this
and
post a bit more information about what you're trying to get. :)

Create a new Update Query and use this

UPDATE tblOwnerInfo SET tblOwnerInfo.NewFieldName = "MailTo:" &
tblOwnerInfo!OwnerLastName & "@" & tblOwnerInfo!EMail
WHERE ((Not (tblOwnerInfo.EMail) Is Null));

Just an idea and it seems to do what you want a little easier.


--
Wayne
Manchester, England.



:



SELECT tblOwnerInfo.OwnerID,
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName
&
'
')
&
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName
& '
') AS OwnerName FROM tblOwnerInfo ORDER BY
IIf(IsNull(tblOwnerInfo.OwnerLastName),'',tblOwnerInfo.OwnerLastName
&
'
')
&
IIf(IsNull(tblOwnerInfo.OwnerFirstName),'',tblOwnerInfo.OwnerFirstName
& '
');

If tblOwnerInfo.Email has some value in it, add "@" After
tblOwnerInfo.OwnerLastName

ie Gates @ Bill
Thanks for any help...........Bob
 

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