User selected field to evaluate (1 Viewer)

Lobster1071

Registered User.
Local time
Today, 08:08
Joined
May 18, 2008
Messages
23
I'm probably not thinking this through clearly, but I'm trying to have a user select a field to evaluate after importing data.

The data being imported can have a different structure every time, so the user would need to type (or select) the field name on

which to do the processing on.

I have code that looks like this...

With rst
var1 = ![SEGMENT]
etc...

Well, the SEGMENT field is variable and can change with each spreadsheet that is imported into the program.

I would just need the user to type in the field to do the processing on. Maybe something on a form called me.chosenfield

I know this isn't correct, but it would be something like:
var1 = ![ & me.chosenfield & ]

Anyone with any idea?

Thank you!
 

MarkK

bit cruncher
Local time
Today, 05:08
Joined
Mar 17, 2004
Messages
8,178
Looks like you are trying to reference a named member of the DAO.Recordset.Fields collection, so you could use code like...
Code:
With rst
   var1 = .Fields(me.chosenfield)
   etc...
hth
Mark
 

Users who are viewing this thread

Top Bottom