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 Programming / May 2008

Tip: Looking for answers? Try searching our database.

Switchboard form to open another form based on combo criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny - 21 May 2008 21:03 GMT
My main form when the database is open is HelpDesk Switchboard.  I need a
shortcut or something to open another form called HelpDesk info based on a
combo box listing our 3 company locations from the HelpDesk Info form.  I'll
just call the locations L1, L2 and L3 for simplicity.  The 3 company
locations is pulled into the HelpDesk Info form combo from a single field
(tblLocation) that lists L1, L2 and L3.  From the Switchboard, I want to be
able choose which location to show their help desk information with seeing
all 3 locations without creating 3 separate HelpDesk Info forms.

Can someone simply this for me please?
Thanks so much.
Signature

Johnny

Klatuu - 21 May 2008 23:11 GMT
Is this just a form you built, or is it an Access Switchboard?
It makes a difference in how you do this.
Signature

Dave Hargis, Microsoft Access MVP

> My main form when the database is open is HelpDesk Switchboard.  I need a
> shortcut or something to open another form called HelpDesk info based on a
[quoted text clipped - 7 lines]
> Can someone simply this for me please?
> Thanks so much.
Johnny - 22 May 2008 13:20 GMT
This is not one I specifically built, but one I am addiing to.  It is totally
homemade and not an Access Switchboard.  Sorry for the confusion.
Signature

Johnny

> Is this just a form you built, or is it an Access Switchboard?
> It makes a difference in how you do this.
[quoted text clipped - 10 lines]
> > Can someone simply this for me please?
> > Thanks so much.
Klatuu - 22 May 2008 15:15 GMT
I would use an Option Group and a command button.
The Option Group would have 3 buttons, one for each location and would
return 1,2, and 3 respectively.

The command button would open the form using the Where argument of the
OpenForm method to filter the form's records based on whatever field in the
form's recordsource that ldentifies the location.  For example purposes, I
will assume the field identifying the location is [Location] and that the
values for the locations are Denver, Chicago, and Dime Box (a small down in
SE Texas :)

The command click event would then be something like:

Dim strWhere As String

   strWhere = "[Location] = """

   Select Case Me.opgLocation
       Case 1
           strWhere = strWhere & "Denver"""
       Case 2
           strWhere = strWhere & "Chicago"""
       Case 3
           strWhere = strWhere & "Dime Box"""
   End Select

   Docmd.OpenForm "HelpDesk", , , strWhere

Signature

Dave Hargis, Microsoft Access MVP

> This is not one I specifically built, but one I am addiing to.  It is totally
> homemade and not an Access Switchboard.  Sorry for the confusion.
[quoted text clipped - 13 lines]
> > > Can someone simply this for me please?
> > > Thanks so much.
Johnny - 22 May 2008 18:21 GMT
Klatuu,

Thank you so much.  You have always helped me in a bind.  I was going in the
right direction with the group and buttons, but did not have the right coding.

You're the best.
Signature

Johnny

> I would use an Option Group and a command button.
> The Option Group would have 3 buttons, one for each location and would
[quoted text clipped - 41 lines]
> > > > Can someone simply this for me please?
> > > > Thanks so much.
Klatuu - 22 May 2008 18:24 GMT
Thanks for the kind words, Johnny.  Glad I could help.
Signature

Dave Hargis, Microsoft Access MVP

> Klatuu,
>
[quoted text clipped - 48 lines]
> > > > > Can someone simply this for me please?
> > > > > Thanks so much.
Jan Baird - 27 May 2008 20:50 GMT
Jan Baird is out of the country until September 20.   Every effort will be
made to respond to messages, but please be patient.
 
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.