Form Interface

A

AccessHelp

Good morning,

I want to create a form where users can select the fields (on the left side
of the form) that they want and click a button to move to the right side of
the form. Then when they click OK on the form, a report will generate based
on the fields that they selected on the form. In addition, I want to have a
form where users can adjust the length of each field that they selected.

Can someone point me to sources that I can get started to create such a form?

Thanks.
 
D

Dennis

Personally, I'd create several public variables to contain either the names
of the selected fields, or as Booleans (yes/no) to decide which fields to
use. Now, there are a couple of different ways to approach all this.
Technically, you can create a report programmatically in VBA. That's one way.
Another would be to use UNBOUND fields in the detail and named labels in the
header(s). Then, depending on your flags/name-values, programmatically
fill-in the column names and select which columns to display at runtime.

I guess the choice would be yours as to which method you prefer. The "build
a new report programmatically" approach has the advantage of being "cleaner"
from a methodology standpoint. However, it's more work (at least initially),
and if you wanted to actually SAVE the report, you'd need exclusive access to
the front-end at that time. Of course, if you just wanted to run it, then you
don't.
 
A

AccessHelp

Good morning Dennis,

Thanks for the information. I have not created something like this before,
and I am very new to creating this.

My situation is:

I have an Access database that links to the SQL database tables. The SQL
database that we use does not have reports that we want. Since we can
connect the tables via ODBC in Access, I am thinking about creating an
interface in Access where the users can select the fields that they want for
a report.

Can you point me to sources where I can see the samples of actual databases?

Thanks.
 
D

Dennis

I'm afraid not. The information I detailed in the post above would be the
method I would use were I to create such a report. Once you've linked the
tables into an Access front-end, you can create forms and reports as if the
tables were local. (as you no doubt know). But SOMEONE around here should be
able to point you at an example (I assume you want to create the report
programmatically, rather than having unbound fields that you populate using
VBA code behind the Detail section).

Using either method isn't particularly difficult; it's just tedious to
set-up. Good luck! (At least you now know that YES, it CAN be done!)
 
A

AccessHelp

Dennis,

Thanks for the information. Your information is very helpful, except I have
to see a sample to get me started.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top