Simple Combo Search on continuous form - help?

  • Thread starter Thread starter K White
  • Start date Start date
K

K White

I have a continuous form on which I need to display three tech names
in order of priority when the user selects the related route name from
an unbound combo box. The fields are "RouteName", "PriorityID", and
"TechName". I have tried several methods, but the closest I came to
succeeding was a combo box that retrieved the correct names, but
edited them after it was selected. Any advice? Thanks in advance.

Kim
 
Can you give us more info about your form's setup, and what is supposed to
happen? Are these three tech names just for display only? or do you want to
be able to change them?
 
Ken Snell said:
Can you give us more info about your form's setup, and what is supposed to
happen? Are these three tech names just for display only? or do you want to
be able to change them?
I have a Route table which is essentially a lookup table w/Route ID
and Route Name. There is a Tech table w/identifying info, etc., and a
Priority table links the Route and Tech tables
(PriorityID,RouteID,TechID). Each tech can be assigned to a route as a
1st choice for that route (priority), 2nd, or 3rd choice.

I want the lookup form to have a combo box for the RouteName. After
the RouteName is selected, I then want the form to list the three
techs (in order of priority) assigned to the selected route. I do not
want this form to update or change any info, which is where I ran into
trouble. Thanks for your help.

Kim
 
If all you want to do is display the three tech names, you'll have a bit of
trickiness to do this on a continuous forms view. Unbound controls (the type
that you likely would use for these three tech names) do not show different
values for each record in an continuous forms view; they show the same value
for all records.

In order to show different values, the easiest way is to include fields in
the form's recordsource to hold those values and then bind the controls to
them. You can lock and disable these controls so that the user cannot change
the values.

You can get sample code for how to use a combo box's selection process for
displaying additional info such as this from this URL:
http://www.mvps.org/access/forms/frm0058.htm
 
Ken Snell said:
If all you want to do is display the three tech names, you'll have a bit of
trickiness to do this on a continuous forms view. Unbound controls (the type
that you likely would use for these three tech names) do not show different
values for each record in an continuous forms view; they show the same value
for all records.

In order to show different values, the easiest way is to include fields in
the form's recordsource to hold those values and then bind the controls to
them. You can lock and disable these controls so that the user cannot change
the values.

You can get sample code for how to use a combo box's selection process for
displaying additional info such as this from this URL:
http://www.mvps.org/access/forms/frm0058.htm

Thank you, Ken! I will try this and post results. One more question if
I may: Can I use a list box or other method to display the related
techs' names instead of using continuous form view? Is there a better
way to list names than this?

Kim
 
I think I slightly misunderstood your original question and operation. It
appears that you're displaying the three tech names as separate records in
the continuous views form? To do that, you certainly need to have the form's
recordsource be a query that is displaying these tech names as separate
records, and thus my earlier comment about them needing to be bound would
already be fulfilled. And, yes, using a continuous forms view is ok to
display these names. No need specifically for a list box or similar setup.

Is the combo box that you're using to select the route number in the form's
form header section? or in the detail section? If not in the form header
section, then it should be moved to that section. That will allow you to
have it be unbound and not display mutiple copies of the selected route
number in the continuous forms view section.

If I'm off the track here, let me know.
 
Ken Snell said:
I think I slightly misunderstood your original question and operation. It
appears that you're displaying the three tech names as separate records in
the continuous views form? To do that, you certainly need to have the form's
recordsource be a query that is displaying these tech names as separate
records, and thus my earlier comment about them needing to be bound would
already be fulfilled. And, yes, using a continuous forms view is ok to
display these names. No need specifically for a list box or similar setup.

Is the combo box that you're using to select the route number in the form's
form header section? or in the detail section? If not in the form header
section, then it should be moved to that section. That will allow you to
have it be unbound and not display mutiple copies of the selected route
number in the continuous forms view section.

If I'm off the track here, let me know.

Ken, you are right on track. Thanks for reading between the lines.
It's tough to word these things just right, but you got it. I'll try
your suggestions and let you know how it works. I appreciate your
help!
Kim
 
Back
Top