Kamis, 29 Mei 2014

Re: [MS_AccessPros] Re: Filling a list box based on a text box

 

That works great!!! THank you very much. Here is the final code.

Private Sub cmdPendingVerification_Click()
Dim strRowSource As String
   
    strRowSource = "SELECT ReferenceList.[Reference Name] " _
        & ", ReferenceList.ReferenceType AS [Reference Type]" _
        & ", FORMAT(ReferenceList.Phone, '(@@@)@@@-@@@@') AS Phone " _
        & ", ReferenceList.ApplicationID " _
        & ", ReferenceList.ApplicationReferenceID " _
        & "FROM ReferenceList " _
        & "WHERE ReferenceList.VerificationFlag = False " _
        & " AND ReferenceList.ApplicationID = " & [ApplicationID]
       
    Me.lstPendingVerification.RowSource = strRowSource
 
    'Me.lstLeaseHistory.Visible = True
    'Me.lstLeaseHistory.Requery
   
    If Me.lstPendingVerification.ListCount < 1 Then
      Me.txtPendingVerification.Visible = True
      Me.lstPendingVerification.Visible = False
    Else
      Me.txtPendingVerification.Visible = False
      Me.lstPendingVerification.Visible = True
      Me.lstPendingVerification.Requery
    End If
End Sub
 

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070
"Only those who will risk going too far can possibly find out how far one can go."






On Thursday, May 29, 2014 12:55 PM, "wrmosca@comcast.net [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
Another "slight correction":
& ", FORMAT(ReferenceList.Phone, '(@@@)@@@-@@@@') AS Phone " _



__._,_.___

Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (13)

.

__,_._,___

Tidak ada komentar:

Posting Komentar