Select a field in query using combo box

February 15th, 2012 - 07:19 pm ET by hotplate | Report spam
I have a table that has fields like: account, jan, feb, mar, apr, may,
jun, jul, etc

I need to create a query that gets the account and I can choose one of
the remaining fields using a combo box. The problem when I tried that
is every record would say jan, or feb, or mar... depending on what I
selected.

Any suggestions? All help is greatly appreciated.

Thanks
email Follow the discussionReplies 4 repliesReplies Make a reply

Replies

#1 Access Developer
February 15th, 2012 - 08:13 pm ET | Report spam
"hotplate" wrote

I have a table that has fields like: account,
jan, feb, mar, apr, may, jun, jul, etc



If you wish to accomplish your purpose with a query, redesign your table; it
does not follow relational design principles/guidelines, to wit, it is
unnormalized. What you've done is called "committing spreadsheet".

You can _construct_ a query to work with your table in VBA code.

But life will be a lot simpler if you redesign the table with fields of:

Account
BillingMonth
Amount (or whatever value represented in the fields you've labeled
by month )

And create a query, where you provide a parameter for Account and for
Billing Month.

Larry Linson
Microsoft Office Access MVP
Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

Similar topics