Record selection in a form

  • Thread starter CharlesCount via AccessMonster.com
  • Start date
C

CharlesCount via AccessMonster.com

I would like to add a field in a form to type in the first 3 letters of a
name and display the information for that name,.

Thanks

Charles
 
A

Allen Browne

CharlesCount via AccessMonster.com said:
I would like to add a field in a form to type in the first 3 letters of
a name and display the information for that name.

Which of these do you want to do:
a) Use an unbound control to find a record that matches the name, or
b) Copy the fields for this name from another table, and fill in the fields
on this form.

If (a), see:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html
There's a combo wizard that does something similar, but this code is safer.

If (b), you need to be really sure whether this is the right approach. In
most cases it won't be, i.e. you should not store the same information in
multiple tables, because it makes it too hard to keep it all up to date. But
there are cases where this makes sense: for example, you might want to copy
a customer's usual address onto their order, even though the particular
order might be going to a different address. If this is what you are doing,
open the Northwind sample database, and open the Orders form in design view.
Take a look at the AfterUpdate event procedure for the CustomerID combo.
Follow that example.
 
Top