Source for a report

George Too

Registered User.
Local time
Today, 17:24
Joined
Aug 12, 2002
Messages
198
Is it possible to programmatically change the source of a report at run-time?
I have a procedure that allows the user to create a query at run-time based on the fields selected from a list box. The query changes depending on what the user has selected. I want that query to be the source for the report (at run-time) but don't have the slightest idea on how to go about it and how to create the bound fields in the report.

Any takers?

Thanks,
George
 
usually,

Me.RecordSource = "new query"


Me.txtControl.ControlSource = " new field"
 
Thanks Mile-O-Phile for your reply.
Basicaly, what I want to accomplish is to have Access create the report on the fly based on a query that the user creates by selecting fields at run-time.
Now, I've been toying with the Access create report wizard by calling it with VBA, which works beautifully. The only problem is that the wizar gives the user too much freedom and I don't know if I can omit some of the steps of the wizard.
Anyone has answers to these?

Thanks, George
 
I see and agree with your point Pat, how then do you suggest I should go about it? I'm using the wizzard just as a means of printing the report and not storing it. Hence my question of whether it is possible to restrict the wizard programmatically, or creating a wizard myself, which I have the slightest idea as to how to go about it, though this is probably the best route.

What do you think?

George
 
Thanks Pat, I had done that already. I was looking at all the forms in the wizards and I couldn't find the print wizard so I suppose it is not one of them. With regard to building my own wizard, I would be up to the challenge but time won't let me, so that's out of the question. Now, I will be playing wiht the wizard building tool see if I can get something out of it. For the mean time, I guess i will have to train the users so they use the Print wizard properly.

Thanks again,
George
 

Users who are viewing this thread

Back
Top Bottom