Refresh a combo

S

Scott

I have an unbound combo box on my form. This an ADP project. I have a button
on the form and just trying to force a requery of the combo. If the combo
name is cmbName, what is the syntax to requery it? I've tried
me.cmbName.Requery and every other syntax I could think of.

Details of combo:

RowSource Type: Table/View/StoredProc
RowSource: SELECT userID, userLast + ', ' + userFirst AS Name, userSS
FROM users ORDER BY userSS
 
G

Guest

The requery method should work just fine. I ran a short test on an ADP it
works as expected. When you say it doesn't work, do you get an error?
Any chance you are being affected by nulls?
Do you have read access to the data?

Does the combo box work the first time into the form?

Those are the only questions I can think of...

Good luck
 
R

RuralGuy

I have an unbound combo box on my form. This an ADP project. I have a button
on the form and just trying to force a requery of the combo. If the combo
name is cmbName, what is the syntax to requery it? I've tried
me.cmbName.Requery and every other syntax I could think of.

Details of combo:

RowSource Type: Table/View/StoredProc
RowSource: SELECT userID, userLast + ', ' + userFirst AS Name, userSS
FROM users ORDER BY userSS

Your syntax is correct to requery the ComboBox. Be aware that the
concantenation character in Access is "&" and not "+", and Name is a reserved
word.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
S

Scott

the combo works fine. i think i'm going to call s tech about this one, i've
wasted too much time on it. thanks any way.
 

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

Top