Solved

Update combo box when scroling through records.

Posted on 2011-02-22
12
263 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:SparkyP
  • 5
  • 4
  • 3
12 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
Your combo box might need a requery action.

Me.Combo.requery

Sincerely,

Ed
0
 

Author Comment

by:SparkyP
Comment Utility


Thanks ED

I have tried Requery in various actions, both on the combo box and the forms, but without success.
0
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
Can you post the Row Source of your combo box?

If you can post a sample db, it would be better.

Ed
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
did you try to requery the combo box in the Current event of the form [Worksheet] ?
0
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
Cap in a rescue. How are you doin' Cap? Wish you well.

Ed
0
 

Author Comment

by:SparkyP
Comment Utility
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.

0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:SparkyP
Comment Utility
Please find attached sample of database. The form in question is called WRS. Many Thanks
EE22022011.mdb
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
what are the names of the combo boxes? in the main form and in the subform?
0
 

Author Comment

by:SparkyP
Comment Utility
Hours ID is the Combo Box that gives the list of Jobs. Tis is the area in the * when the form is open.
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
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?
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
test this


EE22022011.mdb
0
 

Author Closing Comment

by:SparkyP
Comment Utility
EE is worth every penny (dollar, rupee etc)!!!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now