Question : Access database search query/ vba.

Hi there,

I have some users who have an access database in which they have two separate fields. One of which is a "current salary"  the other is a "desired salary" box. Only figures go into those boxes.

How would one go about setting up a query that returns results based on a following question:

Return records that fall between eg 15000 and 25000. (i.e. I would like a report to return only records that have people willing to fall between two limiting amounts which can be changed.

Many thanks,

Gabs

Answer : Access database search query/ vba.

In this case, all you are saving is one copy operation of the original array.
The last 2 lines are why passing by value is normally preferred, after

$some_dataset = // big complicated array
$processed = process_list($some_dataset);

You normally end up with 2 arrays, $some_dataset and $processed, both of which are different.
If process_list takes an array by reference, then those two lines actually end up with $some_dataset and $processed being 2 COPIES of the same arrays (not reference, copy by value).
Array assignments are always copy-by-value, unless & is used to copy the reference.

array_slice by itself creates a copy of the subset.
The 2 sort functions also return new arrays.
You are probably better off just sticking to passing by values unless you really understand it.

FWIW, to save one single copy operation, the last 2 lines would be

$some_dataset = // big complicated array
process_list($some_dataset); // and continue to use $some_dataset after this line
Random Solutions  
 
programming4us programming4us