creating a serach box to find a record

M

mj

i was wondering if any one can help i ave created a small database containg
stock and i am trying to creat a serach box to pop up on it's own with an
option to search for a stock ref no for example... car reg no <type car reg>
brings up that record. hope i make sense
 
J

John Vinson

i was wondering if any one can help i ave created a small database containg
stock and i am trying to creat a serach box to pop up on it's own with an
option to search for a stock ref no for example... car reg no <type car reg>
brings up that record. hope i make sense

This is very easy: use a Parameter query.

If you create a Query based on your table, put

[Type car reg]

including the brackets on the Criteria line under the car reg field.

Even better, if a bit more work, is to create a small unbound Form -
let's call it frmCrit. Put a Combo Box, cboCarReg, on it with a row
source consisting of a Query selecting all the values you want to
search for.

Use a criterion of

=[Forms]![frmCrit]![cboCarReg]

Then base a second form (for onscreen viewing) or a Report (for
printing) on this Query; put a command button on frmCrit to open the
form or report. Select a value from the combo, click the button, and
see the result!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top