Linking a Combox box with a Field Title

EonDel

New member
Local time
Today, 18:39
Joined
Nov 5, 2012
Messages
5
Hello,

I have a form that displays some basic customer information and 12 fields that having billing amounts, they are titled Jan-12 through Dec-12. What I cam trying to do is give someone an option to select which month they want and then a button opens a report that prints invoices based on the values in that month.

I have a combo box that has all the month combinations, is there a way to filter the report and its underlying query to only use the specified month in the combo box?

Or am I going about this the wrong way?

Any guidence would be helpfull.
 
Or am I going about this the wrong way?
The answer to that question is YES, you are. Your table structure is not normalized and should have RECORDDS for each month, not a month column for each month. Once you redesign to a more normalized design, getting the data back out will be simple.

NORMALIZATION BASICS

Normalize.png
 
Welcome to the forum.

You can use the following as the Criteria for the query that is populating your Report;
Code:
Forms!YourFormName!YourComboName.Column([B][COLOR="Red"]x[/COLOR][/B])

Where; x represents the column number of the combo that holds the data you wish to use as your criteria. Remember that the columns in a combo or list box are numbered from Zero on up.

You may also need to have a look at some of the Date manipulation functions that are available.
 
Thanks, yes I am aware of the lack of normalization, I did have this database all set up as best as I could and that ended opening up a receivables/payable form to log all that. My problem is my friend hated it, he is use to an old Lotus 123 WK3 sheet where everything is on one sheet, he keys in data in columns as I mentioned in my first post and prints off of that.

With my limited abilities I haven't come up with a good solution to get what he can see each months billing and select the right billing for printing.

I appreciate your quick feedback

Regards
 

Users who are viewing this thread

Back
Top Bottom