Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform design questions

Status
Not open for further replies.

BoxHead

Technical User
May 6, 2001
876
US
I'm working on a form where users will select items from combo boxes to build a report. The combo box values are used as the criteria in a query on which the report will be based.

The users are 'somewhat' intimidated by Access so I placed a subform on the main form with the query as the source. Each update of a combo box requeries the subform so the users will be able to see the effects of their selections before generating the report.

I went into the design view of the report and dressed it up to look as much like a report as possible.

When I open and run the main form, the changes I made to the subform design are gone. There's no change at all. Thinking the problem may be the sequence of adding the subform and the design changes, I tried inserting another subform with the wizard and selecting the re-designed subform and I tried inserting a subform without the wizard and assigning its source in the property pane.

Nothing has worked.

Is this possible? If not, is there another way to achieve the aesthetic result I'm after?

TIA

John
 
Hallo,

Sounds good, what you're trying to do (giving those users a preview, I mean)

Set up the subform as a normal form (but remove the recordsource, once you are happy with the layout) and drag it from the database window onto the main form (opened in design view) to make the subform. Then save it.

Write a subroutine in the main form which constructs a string containing the recordsource for the subform, based on the current combo box options, and then writes it to the subform's recordsource property.
Now call this routine in the afterupdate method of all the combo boxes.

That sort of thing has worked for me in the past.
If you're making changes to the design of the subform and they're not reflectedwhere you expect, then I can only suggest making sure you save your design changes and checking you're actually picking up the right version of subform.

- Frink
 
Is your subform showing up in datasheet view? If so, try changing the default view.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top