Link to home
Start Free TrialLog in
Avatar of SparkyP
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]![WeekendingDate] and [Forms]![Worksheet]![Weekending 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?
Avatar of MINDSUPERB
MINDSUPERB
Flag of Kuwait image

Your combo box might need a requery action.

Me.Combo.requery

Sincerely,

Ed
Avatar of SparkyP
SparkyP

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
Avatar of Rey Obrero (Capricorn1)
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
Avatar of SparkyP

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.

Avatar of SparkyP

ASKER

Please find attached sample of database. The form in question is called WRS. Many Thanks
EE22022011.mdb
what are the names of the combo boxes? in the main form and in the subform?
Avatar of SparkyP

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?
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SparkyP

ASKER

EE is worth every penny (dollar, rupee etc)!!!