Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Content of subform to display according to main form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johanna Gronlund - 11 Apr 2008 09:48 GMT
Hello,

I have a basic question about forms (I hope).

I have companies, each providing several different services. I need a form
where data entry clerk can first choose the company from a drop down list and
then all the services that they provide are displayed below (I think I need
to create a subform?). Can anyone give me guidance on how this might be
achieved? Ideally without using code as I am not experienced in this. I have
tried wizards and books but have been unable to do this.

Thanks,

Johanna
Golfinray - 11 Apr 2008 13:27 GMT
You need an unbound combo box to act as a filter. Build your form with all
the data then probably the best solution is to build a tables with just the
company name. Make the table of company names the basis of the combo box.
Have the company names in the form also, but hidden. Go into the properties
of the combo and in events use the after update event (the box at the end of
the line.) Start code builder and type:
Me.filter = "[company name] = """ & me.thenameofyourcombobox & """"
Me.filteron = True
Another option would be to build a form with company name and subform with
company data.

> Hello,
>
[quoted text clipped - 10 lines]
>
> Johanna
Johanna Gronlund - 11 Apr 2008 14:56 GMT
Thanks for your reply. I managed to do the combo box with all the companies.
My only problem is that the services section only displays one service per
company and I have to use the arrow on the bottom of the screen to flick from
one service to another. How can I show all the services for one company once?
Or is this even possible?

> You need an unbound combo box to act as a filter. Build your form with all
> the data then probably the best solution is to build a tables with just the
[quoted text clipped - 21 lines]
> >
> > Johanna
LLFK - 11 Apr 2008 14:10 GMT
1.  Build a table with two fields.  One column is the company name and the
other are the services that company provides.

2.  Add all the appropriate records to your table.
Ex.  Record 1 = Microsoft (company name), Computer Training (service)
Record 2 = Microsoft, Computer Purchases
Record 3 = Yahoo, Online Shopping
Record 3 = Potterybarn, Kids Clothing

3.  Create a combo box on your form with the source being the above table so
the user can pick the company.  

4.  Create a second combo box that links to a new query that uses your
created table as the source.  Include both fields.  In the criteria line
under the field for company, put in [Forms]![name of your form]![combo box
field name corresponding to the one where you have your user select the
company name]

Now your drop down on your form will only be limited to the services the
company (who your user selected) provides.

> Hello,
>
[quoted text clipped - 10 lines]
>
> Johanna
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.