Get a Field Value and assign it to a variable in VB Code in a Module

JohnLee

Registered User.
Local time
Today, 06:35
Joined
Mar 8, 2007
Messages
692
Good afternoon folks,

How do I get a field value from a table and assign that value to a variable in my code module.

I want to go though all the records line by line in a table for a specific field and assign the value of that field to a variable in my code module.

This is part of a bigger process, but as I'm just starting on this particular project I just want to do a bit at a time and build it into a bigger process eventually.

Any assistance would be appreciated.

John
 
Two basic methods are DLookup() and a recordset. If you want to "go through all the records" then a recordset loop would be the way to go.
 

Users who are viewing this thread

Back
Top Bottom