Bounded Columns vs Recordset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am new to Access. I want to use directly the SQL statement in the Row source in the ComboBoxes. There will be about 5 or 6 comboxes in a screen. I am just thinking is this a good programming method or do I have to go for the recordsource and populate the values for the Combo boxes? If I use direct SQL statement in the Row source will there be any performance issues? All the combo boxes have the same values being listed.

Any guidance is greatly appreciated.

thanks
vb
 
Using SQL statement as the row source for a combo box is typical. You might
get slightly faster performance if you store the SQL as a query and then use
the query name as the row source, but I doubt you'd notice a difference for
most operations.
--

Ken Snell
<MS ACCESS MVP>

vb said:
Hi,
I am new to Access. I want to use directly the SQL statement in the Row
source in the ComboBoxes. There will be about 5 or 6 comboxes in a screen. I
am just thinking is this a good programming method or do I have to go for
the recordsource and populate the values for the Combo boxes? If I use
direct SQL statement in the Row source will there be any performance issues?
All the combo boxes have the same values being listed.
 
Thanks for the response,
I am thinking of getting data as a recordset and assign the values to Combobox instead of having a SQL statement in the RowSource Property.

Any suggestions/more thoughts

vb
 
Why? This involves code to get and then create the Row Source List for the
combo box. Recordset will be based on a query, so why not just use the query
as the Row Source? What is it you want to do that makes you think you should
use a recordset?

--

Ken Snell
<MS ACCESS MVP>

vb said:
Thanks for the response,
I am thinking of getting data as a recordset and assign the values to
Combobox instead of having a SQL statement in the RowSource Property.
 
This is my thought too. But my team members are of the opinion that the combo box values are the same for about 5 or 6 combo boxes, so use a recordset to get the data once and populate the values for these combo boxes with one fetch from the database. will there be any performance improvement. I am of opinion that there will be more code to maintain.

I really appreciate you for posting the responses.


thanks again,
vb
 
Are we talking about tens of thousands of records to be obtained for each
combo box? What is the number of items in the dropdown list going to be? All
combo boxes are showing the same drop down list? Seems unusual?

If you find that one query against the database takes seconds, then perhaps
using a recordset in code will shorten the time to fill the combo boxes, but
the code will also need to run in order to populate the combo box's row
source list for each box. Again, unless you find that returning the values
to the combo box via a query takes "forever", I think there is little
justification to have code running (which must be maintained) just to avoid
running a query five times.

--

Ken Snell
<MS ACCESS MVP>

vb said:
This is my thought too. But my team members are of the opinion that the
combo box values are the same for about 5 or 6 combo boxes, so use a
recordset to get the data once and populate the values for these combo boxes
with one fetch from the database. will there be any performance improvement.
I am of opinion that there will be more code to maintain.
 
5 items in the dropdown list? Go with the query as the Row Source.

--

Ken Snell
<MS ACCESS MVP>

vb said:
I am sorry I am giving you the information in bits and pieces. The # of
items to be listed are about 5. All the combo boxes have the same values
because for these categories we will collecting the different amounts for
different periods of time/months. I say that there should not be any
performance degradation with this (because there are only 5 values)but the
group insists that I should take this approach.
 
We use both methods.
Bound controls most of the time.
Unbound controls rarely, when the situation warrants it.

So far, unbound controls have only been used when we have multiple
'dependent' combo boxes, which requery when other data on the form changes.
Using unbound controls allows us to avoid multiple requerying of multiple
combo boxes during data entry. Even so, we only did it because we had one
site where Access/Jet ran very slow over the network.

Another reason might be because you have many many people querying the
server.

I have no doubt that using unbound combo boxes might, under some
circumstances, cause less load on the server. You ought to be asking if
that will justify even the minimal effort required. It very rarely does.

(david)

vb said:
Hi,
I am new to Access. I want to use directly the SQL statement in the Row
source in the ComboBoxes. There will be about 5 or 6 comboxes in a screen. I
am just thinking is this a good programming method or do I have to go for
the recordsource and populate the values for the Combo boxes? If I use
direct SQL statement in the Row source will there be any performance issues?
All the combo boxes have the same values being listed.
 
Back
Top