×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Updating Combo Box lists

Updating Combo Box lists

Updating Combo Box lists

(OP)
I am developing an application which uses a combo box to enter data into a field on a form in datasheet mode.
The combo box is based on a query which pulls a list of part numbers previously used by a supplier. This works fine for the first record entered but the query does not appear to be re-run for each new record entered. ( it needs to re-run as selection depends on supplier)
How do I get the combo box to requery the data for each new record added?

RE: Updating Combo Box lists

I have a similar problem with a list box.  The list is based on a query and I need the list contained to change dependent on a second field.  Started to write code to do it but ended up getting more and more confused.  All help appreciated!!!

RE: Updating Combo Box lists

You guys should search the vairous Access forums for the key word "Requery." it's a common newbie question... yes i had the same question too


Kevin,

yes, you'll need to requery your comboBox after you update the part number... this is straight forward to do. with a
Me.MyComboBox.Requery command.  the only issue is choosing the best time to requery.  That's going to depend on when & where those partNo/Supplier relationships are estabished. if their on the the same form or even on a subform then you're golden & see my note to Craig. if not then let me know & we'll go on from there

Craig,

you're in great shape, in the SecondFieldControl_AfterUpdate event you can add the Me.MyComboBox.Requery command

rafe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close