Combo Box values based on current record

crucial_gear

Registered User.
Local time
Today, 14:36
Joined
Dec 11, 2002
Messages
13
I have a continuous form that is being used to schedule shifts for employees. It displays a list of employees including their position and scheduled shifts. I have a combo box that is being used to select a shift for the selected employee. I only want the combo box to display the shifts available based on the position of the employee.

If I select a shift for the first employee in the list and update it's record then move to the next employee and select the combo box to select the shift based on the new records employee position it displays the shifts available from the previous record (which are a different employee position).

I need the combo box to display the shifts available for the current record not the previous record. When I try to requery the ComboBox it requeries the combobox for all records on the screen not just the current one. How can I force it to only requery the CURRENT record.

Thanks for any help that you give.
 
Last edited:
By using the Me.FieldName.Requery, you should just requery the current record.

I'm not real clear on what you need.

If you're trying to select record specific information you can try the SELECT DISTINCT procedure.

I've created a word document which details creating cascading combo boxes if that's what you're looking for.

I posted the document yesterday under the topic Cascing combos WITH query.

HTH :)
 
Last edited:
Thanks for the reply.

I have tried Me.Fieldname.requery, when I click on the combo box, the values displayed are from the previous record.

I need it to requery for the current record.

I have attached an image of the screen. On the print screen you will see two records, the two employees have different positions. The shifts displayed in the combo box needs to display just the shfits for that persons particular position.
 

Attachments

  • schedule.jpg
    schedule.jpg
    75.2 KB · Views: 289
On the table from which you're pulling the Shift Hours, Client, Shift information; is the person's name also listed in the record?

It's difficult to understand without seeing the database.

If you'd like to make a copy of the database, remove sensitive data, and zip it, I'd be happy to look at it for you.

:)
Steve
 
The zipped file is to big to attach to this post, is there an email address I can send it to?

To answer your question, No the persons name is not in the table with the shift information. This is a two step process.

First Step: Enter in all the shifts that are available

Second Step: Assign an available shift to a person based on their position.

This database is in the development stages only, so the only data is just test data. In addition, you may see some things in the database that do not work at present.

Once you open the database - click on the Schedule button next to the Employee button. You will see a drop that down that says Select Week, select the week 01/07/03 to display the test data.

Thanks for your assistance and taking the time to look at the database. It is much appreciated.
 
I'm looking at the database and see many tables, queries, and forms.

Now I need to know which forms, tables, fields, etc. you're referring to in as much detail as you can provide.

Thanks. :)
 

Users who are viewing this thread

Back
Top Bottom