Requery doesn't work

G

Guest

Access 2003:
I have a form with a combo box, [cboStudents]
The combo box's recordsource is a parameter query.
The parameter is a textbox on the form.

In the after-update event of the text box, I put in the code
me!cboStudents.requery

When I open the query, I see the proper records.

The combo box, however, is not changed. The requery command doesn't appear
to do anything.

I've tried various approaches, using option buttons, etc, but can't get that
combo box to requery.

Any ideas why?
 
K

kingston via AccessMonster.com

You have to explicitly change the row source of the combobox. Implement this
after the text box changes by dynamically building the SQL string:

Me.cboStudents.RowSource = SQLstring
Me.cboStudents.Requery
Access 2003:
I have a form with a combo box, [cboStudents]
The combo box's recordsource is a parameter query.
The parameter is a textbox on the form.

In the after-update event of the text box, I put in the code
me!cboStudents.requery

When I open the query, I see the proper records.

The combo box, however, is not changed. The requery command doesn't appear
to do anything.

I've tried various approaches, using option buttons, etc, but can't get that
combo box to requery.

Any ideas why?
 

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