sunnyimran
10-02-2019, 01:23 AM
Hi,
I want to clarify VBA IF statement. What is the difference between them:
if x=true
' do something at t
end if
if NOT x=false then
' do something at true
end if
Both statements will check same conditions. What is the difference among them.
To be more specific I am working on recordset object adodb and trying to find the difference between these and can't figure out
If Not objMyRecordset.EOF=True
' do something when objMyRecordset.EOF is not true (Implicitly means False
End if
objMyRecordset.EOF=False Then
I'd do something when objMyRecordset.EOF returns False (implicitly means not Then
End if
Both If's are checking same condition here too. But on numerous articles on internet I found the test condition with "If Not objMyRecordset.EOF=True Then". There must be some real reason behind this. can someone explain?
regards
I want to clarify VBA IF statement. What is the difference between them:
if x=true
' do something at t
end if
if NOT x=false then
' do something at true
end if
Both statements will check same conditions. What is the difference among them.
To be more specific I am working on recordset object adodb and trying to find the difference between these and can't figure out
If Not objMyRecordset.EOF=True
' do something when objMyRecordset.EOF is not true (Implicitly means False
End if
objMyRecordset.EOF=False Then
I'd do something when objMyRecordset.EOF returns False (implicitly means not Then
End if
Both If's are checking same condition here too. But on numerous articles on internet I found the test condition with "If Not objMyRecordset.EOF=True Then". There must be some real reason behind this. can someone explain?
regards