Input field to lookup a record and then display it in form

J

john smith

This seems like the easiest thing in the world to do but frankly with
filtes and queries its confusing.

Whats the best way to begin? Theres lot of examples of queries and
filters in tons of books but I havent seen any straight forward
examples of this really basic task.

I have a form and a database/table already constructed.

Id like to bring to open the form and have the fields initially blank.
I assume you set the variables to some default values in properties.
Then at the top of the screen theres a variable input soc sec or date
where after inputting it , there is a search and the matching record
is displayed. Ridiculously simple.

The best approach?

I dont want to use any filter or query construction features in Access
interactively which many books show. I want it set up so that the user
just types in the soc sec etc and it searches the table.

Additionally --- how do you turn that warning off? Everytime I open up
the database file theresa warning that the file may be a malicious
file.
 
A

Allen Browne

If your table has a primary key, and you just want to locate the single
record in the table based on this value, see:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html

If you want to provide several unbound boxes at the top of your form where
the user can enter search values for different fields, and then filter the
form to whatever matches, see:
http://allenbrowne.com/unlinked/Search2000.zip

The initial warning message issue suggests you are using Access 2003. If so,
just set the Security level to Low under:
Tools | Macro | Security
If you do not see that option on your menus, reset the menus.
 
J

JohnS

If your table has a primary key, and you just want to locate the single
record in the table based on this value, see:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html

If you want to provide several unbound boxes at the top of your form where
the user can enter search values for different fields, and then filter the
form to whatever matches, see:
http://allenbrowne.com/unlinked/Search2000.zip

The initial warning message issue suggests you are using Access 2003. If so,
just set the Security level to Low under:
Tools | Macro | Security
If you do not see that option on your menus, reset the menus.


Thanks.

I did create the unbound boxes but Im used to using FIND , SEEK etc.
in dbase code. Really straight forward simple.

I see that you can also use SQL SELECT statements too.

Ill check your links out.
 
J

John Vinson

I dont want to use any filter or query construction features in Access
interactively which many books show. I want it set up so that the user
just types in the soc sec etc and it searches the table.

You can use the Combo Box Wizard in the toolbox to put an unbound
combo in the Form's Header. Use it to enter a SSN; the combo wizard
will write VBA code in its AfterUpdate event to navigate to the
selected record.

John W. Vinson[MVP]
 
J

JohnS

You can use the Combo Box Wizard in the toolbox to put an unbound
combo in the Form's Header. Use it to enter a SSN; the combo wizard
will write VBA code in its AfterUpdate event to navigate to the
selected record.

John W. Vinson[MVP]

Thanks Ill try that too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top