Link to home
Start Free TrialLog in
Avatar of ouestque
ouestqueFlag for United States of America

asked on

Access: Report: Controls with control source not on table

I have a report thats control source = table1. Table1 has the following fields: (1,2,3,4,5).
A combo box on this report has a control source = 72. Because 72 is not a field on table1, when I try to print this report it asks me what the value of 72 is before printing.

Is there a way to get my Access database to NOT ASK me what the value of 72 is before printing or showing print preview?. I just want it to print and ignore controls with a control source that does not exist on table1.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

what's a combo box doing in your report?

and what does 72 suppose to be?
ASKER CERTIFIED SOLUTION
Avatar of jjafferr
jjafferr
Flag of Oman image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ouestque

ASKER

Answer1: There are combo boxes in my report  because 'I am assuming'  the previous programmer had to convert all 102 forms in the database to a report format. It's kind of a long story, but it was much faster to cut and paste controls from each form to a report, then resize all controls as a textbox.

Answer2: There are about 200-700 controls on the report. 72 represents the 72nd control on the report. (They were labled this way before I was told to 'fix' the thing :(
Although jjafer's code answers the question above, I have 102 forms with up to 250 controls with control sources. All 102 reports  have different control names. Many of which have control sources that don't exist on the table.

QUESTION: Is there a way to tweak jjafferr's code above so that it will check all controls on my report and if the control source for that control doesn't exist on the table, it doesn't assign a control source to that control.

I could cut and paste this code to all 102 reports (Instead of checking all 250 controls on each form for control source validity)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I suppose there is no other way than to get rid of the problem controls or change them. Nonetheless I really appreacate ya'lls help THANKS!!!