I would like to create a report from a query (listbox that lists the whole queries existing) automatically by using a VB code and naming this report by a msgBox.
Are you asking for someone to help you rewrite all the code from the report wizard?
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
Once you have created a report you can use code to set properties such as Record Source and add controls.
Check out the CreateReportControl method in Help. You may also want to use DAO to get a list of fields from your report's record source.
There are some properties that can only be created while in design view such as sorting and grouping levels.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
there are several threads in these (Tek-Tips) which explore the topic sufficiently for most to be able to follow the example and generate a basic report. As a new member, your profile doesn't reveal much about your backround, so if you are not pretty comfortable with programming, you would be better getting some professional help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.