SparkyP
asked on
Update combo box when scroling through records.
Hi
I have a a form for engineers to input their weekly jobs. This has 2 field, the engineers name and the weekending Date. The weekend Date is a lookup from a Weekending Date Table.
The Subform has a Combo box that looks up all the jobs that the engineer has completed, which comes from a query, and uses a Dlookup to populate the subform.
My problem:
I am trying to GET the Combo to display only records for that weekending on the main form, ie. Between [Forms]![Worksheet]![Weeke ndingDate] and [Forms]![Worksheet]![Weeke nding Date] -7
The Main Form is filtered to only display the current and previous weekendings. The combo on the subform seems to pull from the first weekending, but does not update when I go to the next weekending.
Where am I going wrong?
I have a a form for engineers to input their weekly jobs. This has 2 field, the engineers name and the weekending Date. The weekend Date is a lookup from a Weekending Date Table.
The Subform has a Combo box that looks up all the jobs that the engineer has completed, which comes from a query, and uses a Dlookup to populate the subform.
My problem:
I am trying to GET the Combo to display only records for that weekending on the main form, ie. Between [Forms]![Worksheet]![Weeke
The Main Form is filtered to only display the current and previous weekendings. The combo on the subform seems to pull from the first weekending, but does not update when I go to the next weekending.
Where am I going wrong?
ASKER
Thanks ED
I have tried Requery in various actions, both on the combo box and the forms, but without success.
Can you post the Row Source of your combo box?
If you can post a sample db, it would be better.
Ed
If you can post a sample db, it would be better.
Ed
did you try to requery the combo box in the Current event of the form [Worksheet] ?
Cap in a rescue. How are you doin' Cap? Wish you well.
Ed
Ed
ASKER
Capricorn
Tried the Current Event but seem to get some form of loop, the screen flashs on the same record for several second.
I am in thethrows of reducing the database to send.
Tried the Current Event but seem to get some form of loop, the screen flashs on the same record for several second.
I am in thethrows of reducing the database to send.
ASKER
Please find attached sample of database. The form in question is called WRS. Many Thanks
EE22022011.mdb
EE22022011.mdb
what are the names of the combo boxes? in the main form and in the subform?
ASKER
Hours ID is the Combo Box that gives the list of Jobs. Tis is the area in the * when the form is open.
your combo box rowsource have a criteria on the field [Job Date]
Between [Forms]![WRS]![Weekending Date]-7 And [Forms]![WRS]![Weekending Date]+14
are you aware of this?
Between [Forms]![WRS]![Weekending Date]-7 And [Forms]![WRS]![Weekending Date]+14
are you aware of this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
EE is worth every penny (dollar, rupee etc)!!!
Me.Combo.requery
Sincerely,
Ed