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.
--
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.
"Timmy" <(E-Mail Removed)> wrote in message
news:B68E55E5-601D-4C29-9593-(E-Mail Removed)...
>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