Combo box problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

This is very strange - one of my combo box-subform combinations isn't
working right. When I initially select a name in the box the correct phone
number shows up in the linked subform, but when I change the name, the number
remains the same until I either navigate away and then back to the record, or
close the form and reopen it.
I don't think I did anything different with this one, so I'm at a complete
loss as to why this would be happening.
This is the only instance on my form where this is happening, the other
combo boxes are working fine.

Any ideas anybody?

Thank you.
 
In the on change event of the combobox select code builder

Type Me.refresh

To show the refreshed data you have just entered

Private Sub Combo22_Change()
Me.Refresh 'Refreshes the form
DoCmd.Requery 'Requeries the source
End Sub

--
An Engineers Prayer:
At the very end of the day,
when all else fails,
you have tried all
and asked everyone you know,
read the instruction manual.
 
Actually, when I put refresh in the After Update event, it was not such a
good ideas since it messed up other parts of the form. But requery works fine.

Thanks for your help!
 
I have a question on a slight variation of this. I have the same problem of
combo boxes not updating with the correct options without a refresh button
being pressed. It looks like this simple "Me.Refresh" solution would work
for me, the only problem being that I need it to refresh other forms, not the
form the combo box is in. I'm not adept enough at VB to know exactly how to
code that. If anyone could help that would be great.
 
Hi Brett, this thread is almost dead, your lucky I took alook at my history
subjects else I wouldn't have seen your post. Neither would anyone else
because they normally only browse the top few pages unless they are looking
for something specific.

You would requery the query behind the form to refresh the source data

Not sure how that would be fired from the Combo Box though, I suggest you
open a new question in the news group.

Sorry cant help further
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top