dynamic field name in a query

I'm using someone's table that has some sales goals fields set up, like U2008MAN (for machine goal in 2008), U2008PART (for parts goal in 2008), U2007MAN, etc. I want to set up a query to get the current year and previous year goals. Is there a way to build the field names in the query, along the lines of:
CurrMachineGoal:["U" & year & "MAN"]?
(I can do the year part, just don't know if something like this is possible)
avoorheisAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jmoss111Connect With a Mentor Commented:
Hello avoorheis,

You can build the query in VBA and populate the querydef

Regards,

Jim
0
All Courses

From novice to tech pro — start learning today.