Hello all programmers .... need some tips which i have some issue down here...
I got test the (sql1) and then the result for the records is zero (0) ...when it's run for "check manager gender" , the error appears... give me some help and i will owe u guyz a beer...

sql1 = "SELECT CMS_INDIVIDUAL.FULL_NAME AS DirectorName, CMS_MASTER_SETUP1.DESCRIPTION AS Suffix, " & "........
       ".........................."

Set recsetCheck = m_oData.query(sql1) ------- > Get the records for (sql1) 'The result for the record is "0"
    sql1 = ""

            'to check manager's gender.
                If Not IsNull(recsetCheck!GENDER) Then
                   If recsetCheck!GENDER = "F" Then directorname = directorname & " " & "(f)" -------> here i got the error
                End If


                'And i try to change my code like this

                 If Not IsNull(recsetCheck!GENDER) Then
                    While Not recsetCheck.EOF
                        If recsetCheck!GENDER = "F" Then
                        'to add the (f) after the director name
                        directorname = directorname & " " & "(f)"

                        End If
                        recsetCheck.MoveNext
                    Wend

Can i use this code???????

Hi,

Before Line 8, wite this:
If Not recsetCheck.EOF Then

Write "End If" on line 24

Regards
Veena

"Either BOF or EOF is True Or the current ..." occurs when you try to access a recordset's data after it has reached it's last record (cos no record exists after the last record) (or) the recordset doesn't have any data.

Wrap your code with the if ... End If conditional class as Veena said

FYI
BOF - Beginning Of File
EOF - End Of File

Edited 4 Years Ago by samsylvestertty

This article has been dead for over six months. Start a new discussion instead.