0

I have textboxes from where I am retrieving data. They have Number datatype and Field Size Double and Format is Fixed.

Summ = DLookup("Summ", "tblPlatej", "ID= " & Form_frmPlatej!ID)
Deposit = DLookup("Deposit_before", "tblPlatej", "ID= " & Form_frmPlatej!ID)

First one returning true value, second one is Empty always. Why this happens? Can someone put me in right direction?

Firdavs Kurbonov
  • 1,252
  • 4
  • 16
  • 42
  • This is a continuation of http://stackoverflow.com/questions/11426564/how-to-convert-currency-into-double-in-vba/11427181#comment15107344_11427181 – Fionnuala Jul 12 '12 at 10:29
  • I fixed the problem, I don't know how it worked. The problem was in column name. Before it was Deposit_before, and I changed to Depositbefore it worked. When there is space between words in column name it doesn't want to work. – Firdavs Kurbonov Jul 12 '12 at 11:30
  • Glad you've fixed it, just for reference if you are using column names containing spaces etc then you can enclose them as follows, [Deposit_before] – Matt Donnan Jul 12 '12 at 12:28

1 Answers1

1

The problem was in column name. Exactly in space bar between words [Deposit before].

Summ = DLookup("Summ", "tblPlatej", "ID= " & Form_frmPlatej!ID)
Deposit = DLookup("Depositbefore", "tblPlatej", "ID= " & Form_frmPlatej!ID)

It is very strange but it works now.

Firdavs Kurbonov
  • 1,252
  • 4
  • 16
  • 42