Use DLookup() to get the value from the field, e.g.:
X = DLookup(...
For help on DLookup(), see:
http://allenbrowne.com/casu-07.html
Note that X must be declared as a Variant, since the DLookup() could return
Null.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I need to assign a value from a table to a declared variable in VBA (a
> declared variable "Number" takes on a value from table X) It's probably
> not
> hard, but i'm confused about the syntax
Timmy - 28 Mar 2007 14:50 GMT
I did that but I get an "Overflow" error for some reason
> Use DLookup() to get the value from the field, e.g.:
> X = DLookup(...
[quoted text clipped - 9 lines]
> > not
> > hard, but i'm confused about the syntax
Allen Browne - 28 Mar 2007 14:58 GMT
Did you start the procedure with:
Dim X As Variant
If that doesn't solve it post your procedure.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I did that but I get an "Overflow" error for some reason
>
[quoted text clipped - 12 lines]
>> > not
>> > hard, but i'm confused about the syntax
Timmy - 28 Mar 2007 15:14 GMT
It did work. I changed it from an interger to a double and it works great.
Thank you very much
> Did you start the procedure with:
> Dim X As Variant
[quoted text clipped - 17 lines]
> >> > not
> >> > hard, but i'm confused about the syntax