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

How do I "Refresh" Data Automatically?

How do I "Refresh" Data Automatically?

How do I "Refresh" Data Automatically?

I have a combo text box on a (datasheet view) sub-form that selects its data from a field in a table that is separate from the underlying sub-form record source.  I have the sub-form control's "Limit to List" property set to "No".  When the user discovers the value they are trying to enter is not in the underlying list (by the pop-up notification after the attempt), they have the option of adding the value to that table by returning to the main form and clicking on a "Add to List" Macro button I have placed right next to the sub-form.  This button opens up another form that is linked to the table where the list fields are stored.  After adding the new record/list item, the form is closed.

My problem is, after the new record is added to the list, I am still unable to add this added item to the sub-forms' combo-box field - because the underlying table has not "refreshed" itself.  I have to close and re-open the main form for it to appear in the list.

Is there a way to automatically update records that have been added to a combo-box list source?  I think this is called "Refresh" - or at least it used to be, but there is nothing in Help that explains it.

Thanks in advance!


RE: How do I "Refresh" Data Automatically?

Add the following to the On Close event of the form where you added the record.

On Error Resume Next

If the form you would be returning to(i.e. you opened this form by itself) then the error that the form isn't open will be bypassed.

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