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

#delete in combo boxes

#delete in combo boxes

#delete in combo boxes

i have a form that deletes a record in a table.  The user chooses the relevant record from a combo box, and then click a button that says delete record, once this process is done and the user returns back to the combo box where the record has been a deleted there is #deleted listed in the combo box, but if a user by mistake clicks this there is an horrible error message, what can i do to avoid this, what VBA code could i put in the after update method? please help!

RE: #delete in combo boxes

You need to requery the combo box to get it to rebuild its list. In your AfterUpdate method, do:

Actually, I had a problem with something like this not long ago, so I'm not sure this will work, but give it a try.

Rick Sprague

RE: #delete in combo boxes

Thanks Rick

but i am afraid this did not work, but the reason for this may be because when i created the combo box, access gives you an option to "look up values in a table/query", or the other option is to "find a record on my form based on the value i select in the combo box".

I took the latter option, therefore i think the requery will not work.  Any further ideas?


RE: #delete in combo boxes

I have just had a thought, i actually need to put the requery statement in the command button that deletes the record from the table, and yes this works, thanks Rick!


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