Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Combo Box query to refresh

Status
Not open for further replies.

blinton25

Programmer
Mar 20, 2004
104
0
0
BB
Hi,

My combo box is populated by a query which pulls values from a table, but when changes are made to the table the values in the combo box aren't refreshed unless I close the form and reopen it.

Is there a way to force the query to refresh?
 
on a form, current event, perform a requery on the combo box:

Private Sub Form_Current()
Me!cboName.Requery
End Sub



or a generic: DoCmd.Requery

 
Hi,

I used the macro which runs the query to run a requery.

Thanks
 
Hi blint,

Don't use a macro - use vba as nq advised - you ARE a 'Programmer' are you not?

1) Macros are for secretaries.
2) Macros are impossible to debug as they are unreadable compared with vba.
3) Your application successor will curse you for life otherwise.

ATB ; )

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
How are ya blinton25 . . .

You should start aquainting yourself with [blue]VBA![/blue] Reason:
TheAceMan1 said:
[blue]There's alot of [blue]VBA[/blue] code out there (and here at Tek-Tips of course) that can solve most if not all your problems, versus [blue]Macro's[/blue] which I doubt you'll ever find. Given the extreme limitations of [blue]Macro's[/blue] versus [blue]VBA[/blue] better for you to take a step up. When you do you'll wonder why you staid so long![/blue]

BTW: To get great answers be sure to have a serious look at FAQ219-2884 or FAQ181-2886

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top