Find Record

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Lets just say that i have a table named assets, and a form named assets, and
another form named barcodefinder...

All i really need to do, is for the barcodefinder form to have a button,
which will then search through the records in the assets table, preferably
in the barcode column.. When it finds a match/matches, it will then go to
either the assets form (which goes through all the records one by one) and
show each match one by one...

Can i have a bit of help on the find or find next function's to be able to
do this...
TIA
 
Ben,
Why not just place an unbound combo box (ex. cboBarCodeFilter) on your
asset form (in the upper right corner, out of the way).
Populate that combo with all possible BarCodes from Assets.
On the AfterUpdate event of cboBarCodeFilter... (use your own names)
FilterOn = False 'clear any previous filter
Filter = "[BarCode] = Forms!frmAssets!cboBarCodeFilter"
FilterOn = True ' apply the filter
This will filter out all records but those where the BarCode matches
cboBarCode. You can then just "browse" through all the records returned.
You could also set up cboBarCode so that when it's Dbl-Clicked, the form
is unfiltered and returned to normal.
hth
Al Camp
 
Back
Top