alphabetical order in combobox of subform

B

buggirl

Good morning,

I'm entering data into a form and subform. The subform has two columns -
name (combobox) and abundance (I'm recording abundances of bugs). It seems to
work great, except when I find a new bug and add it to the original table
that the subform is based on. The new bug is simply added to the bottom of
the list, whereas I would like the names to be listed alphabetically.

Any suggestions?

Thanks,

buggirl
 
J

Jeff Boyce

Is your combobox based directly on a table, or on a query? If on a query,
are you sorting by name?

If you are adding new entries to the underlying table via the combobox, are
you requerying the combobox after the addition?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

buggirl

I thought this was a simple question - looks as though it's more complicated
than I realised!

The form is based on tbl InvertAbundances, which has four fields:

InvertAbundPK
SampleID
InvertNameID
InvertAbund

InvertNameID is a lookup from tbl InvertTaxonomy.

So, to add a new name to the list, I go to tbl InvertTaxonomy and add it
there. And then I go back to my form to add the abundance data.

Thanks for your help!

buggirl
 
J

Jeff Boyce

My suggestions were implied in my questions.

Use a query to 'feed' the combobox. Sort in the query.

Remember to requery the combobox after adding the new record.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

buggirl

OK, I'll fool around with the query... But I don't really understand why I
can't go directly from a table to a form?
 
J

Jeff Boyce

Tables are 'buckets o' data', with no inherent order.

Queries give you a way to select data and sort it.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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