Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to place a table value into a string variable?

Status
Not open for further replies.

MCSGraham

Programmer
May 28, 2002
52
US
I am trying to place the value of a field in a table into a string variable but it keeps giving an error..this is the code:

Dim strEnroll As String

strEnroll = [Charge!Enroll]

(Charge is my table where Enroll is a field in it.)

Not sure if I have to open the table first either.

thanks a lot!
 
Hi!

Try this:

Dim strEnroll As String

strEnroll = DLookUp([Enroll], [Charge], Put your criteria here)

hth

Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top