cmdButton question?

  • Thread starter Thread starter Al9315
  • Start date Start date
A

Al9315

Hi
I have a database using VBA coding. I have 4 command buttons - left to right
= 1st record, previous record, next record, last record. All works fine BUT:
The database is my suppliers in alphabetical order, ever growing in number,
and if I wish to scroll through to say the G's I have to click the 'Movenext'
button a lot of times. Any suggestions - can code be written that if I hold
the Left mouse button down on the cmdButton that it can scroll quicker, but
perhaps under control ?!?!
Any help much apprecitated

Al
 
Hi
I have a database using VBA coding. I have 4 command buttons - left to right
= 1st record, previous record, next record, last record. All works fine BUT:
The database is my suppliers in alphabetical order, ever growing in number,
and if I wish to scroll through to say the G's I have to click the 'Movenext'
button a lot of times. Any suggestions - can code be written that if I hold
the Left mouse button down on the cmdButton that it can scroll quicker, but
perhaps under control ?!?!
Any help much apprecitated

Al

A better way to go to a particular supplier's record would be to add a
Combo Box to the Form Header. Use the Combo Wizard and select the 3rd
option on the first page of questions, something like "find a record
.... etc...".
Continue with the wizard, making sure you include the SupplierID as
well as the Supplier Name fields. Order the combo box on the Supplier
Name field.
Set the Combo's Bound column to the SupplerID, and hide it by setting
that column's width to 0".
When done, simply enter the beginning letter(s) of the supplier you
want, i.e. typing "Gas" will bring up all of the suppliers whose names
begin with "Gas". Find the exact one you want in the drop-down list.
Select that supplier's name and that record will display on the form.
Much faster and surer than going through each record with a command
button.
 
Back
Top