Hi,
This code part of a large program that I am developing and I have used this extensivly through out the program with success. However, here it is not working because I hve LOAN_TYPE = 11 FHA. I know this is the case because if I take out the where clause it works. If I set it to not Null it works; but this does not give me what I want natually. The problem is that there are spaces in it(and I can not change this), but even if I use brackets, that is [11 FHA], it still does not work. If anyone has any ideas I would really appreaciate it; because I have been tying to figure this out for some time now.
Thank you
Here is the code I am using:
Rs2.Open " Select [CURRENT] FROM [tblEscrow_Avdvance_rtp_Count] WHERE [tblEscrow_Avdvance_rtp_Count].[LOAN_TYPE] = 11 FHA ", _
Cn, adOpenKeyset, adLockOptimistic
Err.Number = 0
If Rs2.State <> 1 Then MsgBox "I am Not a 1 "
Set r2 = xl1.Range((Chr$(66) & Val(6)))
r2 = Rs2![CURRENT]
ITM
This code part of a large program that I am developing and I have used this extensivly through out the program with success. However, here it is not working because I hve LOAN_TYPE = 11 FHA. I know this is the case because if I take out the where clause it works. If I set it to not Null it works; but this does not give me what I want natually. The problem is that there are spaces in it(and I can not change this), but even if I use brackets, that is [11 FHA], it still does not work. If anyone has any ideas I would really appreaciate it; because I have been tying to figure this out for some time now.
Thank you
Here is the code I am using:
Rs2.Open " Select [CURRENT] FROM [tblEscrow_Avdvance_rtp_Count] WHERE [tblEscrow_Avdvance_rtp_Count].[LOAN_TYPE] = 11 FHA ", _
Cn, adOpenKeyset, adLockOptimistic
Err.Number = 0
If Rs2.State <> 1 Then MsgBox "I am Not a 1 "
Set r2 = xl1.Range((Chr$(66) & Val(6)))
r2 = Rs2![CURRENT]
ITM