Switchboard form to open another form based on combo criteria

J

Johnny

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.
 
K

Klatuu

Is this just a form you built, or is it an Access Switchboard?
It makes a difference in how you do this.
 
J

Johnny

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.
 
K

Klatuu

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
 
J

Johnny

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.
--
Johnny


Klatuu said:
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

--
Dave Hargis, Microsoft Access MVP


Johnny said:
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.
 
K

Klatuu

Thanks for the kind words, Johnny. Glad I could help.
--
Dave Hargis, Microsoft Access MVP


Johnny said:
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.
--
Johnny


Klatuu said:
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

--
Dave Hargis, Microsoft Access MVP


Johnny said:
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.
--
Johnny


:

Is this just a form you built, or is it an Access Switchboard?
It makes a difference in how you do this.
--
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
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.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 

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