Ben_Entrew
Registered User.
- Local time
- Today, 12:42
- Joined
- Dec 3, 2013
- Messages
- 177
Hi all,
something is wrong with my syntax.
Does anyone has a clue? If I type 2014 instead of b everything works out.
RepMonth is 012014.
Thanks in advance.
Regards,
Ben
something is wrong with my syntax.
Does anyone has a clue? If I type 2014 instead of b everything works out.
RepMonth is 012014.
Code:
Dim a As Double
Dim b As String
b = Right(RepMonth, 4)
a = DLookup("[EUR/TRY]", "Plan_FX_RATES", "YEAR = '" & b & "'")
Debug.Print a
Debug.Print b
Debug.Print RepMonth
Thanks in advance.
Regards,
Ben