Results 1 to 4 of 4

Thread: displaying error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    displaying error

    i have this my code
    VB Code:
    1. Private Sub MDIForm_Load()
    2. sad = "Select * from tbapplicant where EndDateREserved like '" & lblDate & "%'"
    3.  
    4. tbApplicant.Open sad, cn, adOpenDynamic, adLockOptimistic
    5. With tbApplicant
    6.    ' .Find "EndDateREserved = '" & lblDate & "'"
    7.     If .EOF = False And .BOF = False Then
    8.         Label5 = .Fields(3)
    9.     End If
    10. End With
    11.  
    12. end sub

    when i comment the .Find the .fields(3) will display to the label but if i dont comment the .Find no records will display what will i do...

    thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: displaying error

    What are you trying to do that isn't already being done?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2006
    Posts
    84

    Re: displaying error

    what do you mean

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: displaying error

    I mean I don't understand the question.
    Quote Originally Posted by mheiy
    when i comment the .Find the .fields(3) will display to the label but if i dont comment the .Find no records will display what will i do...
    Based on this it would seem that you don't need to use .Find and everything works, so I don't get the issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width