option and combobox cascade

S

steve a

I'm trying to get a toggle box selection to then cascade to a combo box,

I'm currently using:

Private Sub optward_AfterUpdate()
On Error Resume Next
Select Case optward.Value
Case 1
cboname.RowSource = "query.Dalby.Name"
Case 2
cboname.RowSource = "query.fenton.name"
Case 3
cboname.RowSource = "query.farndale.name"
Case 4
cboname.RowSource = "query.kirby.name"
Case 5
cboname.RowSource = "query.kyme.name"
Case 6
cboname.RowSource = "query.boston.name"
End Select
End Sub

not sure whats wrong?
any suggestions?
Thanks
 
D

Douglas J. Steele

What are "query.Dalby.Name", "query.fenton.name", "query.farndale.name"
supposed to be? What's the RowSourceType set to? If it's Table/Query, then
you need to put the name of a table or query for the RowSource property, and
I don't believe you can put periods in table or query names.

Incidentally, when posting a query, it's a good idea to indicate what
problem you're encountering! If you're getting an error message, indicate
the exact error message. If you're not getting an error message, but it's
not working the way you'd hope, indicate what does happen, and what you
hoped would happen instead.
 
S

steve a

Hi doug.
Thanks for the reply.
Firstly, when a toggle button is selected, the combo box doesn't have any
options appear in it.

the "query.****.name" is a row in a query which i want to use for
reference.
cboname is the name of the combo box, and optward is the name of option box
frame.
I've changed the combo box row source type to table/query in the properties.
but still no joy.
any further advice would be apperciated.
any thanks
Steve
 
D

Douglas J. Steele

Sorry, I don't understand what you mean by "a row in a query which i want to
use for reference".

If the combo box's RowSourceType is Table/Query, the RowSource must be the
name of a table, the name of a query, or an SQL statement.
 
S

steve a

Hi doug.
I've managed to get it sorted, thankyou for the help.
I did have the table/query reference all up the spout.
Thanks
 

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