I'm baaack! So thankful for your help. Have two questions.
1. I found John's code for creating an IsNothing module and did so. But when I went to use it, nothing. When I deleted the "If Not IsNothing(Me.LastName) Then" line, the rest of the code executed. How necessary is that line?
2. I would like to order the select statement by last name. I entered it before the WHERE statement but must have done something wrong. I'm including the code that worked without the ORDERBY statement.
Thanks a million!
Connie
' Check for similar name
'If Not IsNothing(Me.LastName) Then
' Open a recordset to look for similar names
Set rst = DBEngine(0)(0).OpenRecordset( _
"SELECT LastName, FirstName, SpouseFN FROM " & _
"Contacts WHERE Soundex([LastName]) = '" & _
Soundex(Me.LastName) & "'")
Rabu, 21 September 2011
[MS_AccessPros] Adding OrderBy to sql in code AND necessity of "IsNothing" line
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar