Locating individual records

G

Guest

Hi,
I've been given the task of designing a database of employees in Access 2003
and am very much learning as I go. What I want to do is have a button or drop
down box in a form which the user can type an employees name into, or select
one from a list, which will then take them to that employee's records so that
they can print a report. So far I have managed to create a drop down box
which contains all the employee names, but does not do anything when a name
is selected, and I can separately generate a report of all the employee's
details but not just one individual. How do I tell Access to find the
information stored in the table of employee details when one name is typed in
or selected? I have never used Visual Basic or SQL so I'm hoping there is a
way to do this without them.
Any suggestions, even ones you might think are obvious, would be very much
appreciated as I am really stuck,
Many thanks,
Hazel
 
M

Marshall Barton

drumwhindle said:
I've been given the task of designing a database of employees in Access 2003
and am very much learning as I go. What I want to do is have a button or drop
down box in a form which the user can type an employees name into, or select
one from a list, which will then take them to that employee's records so that
they can print a report. So far I have managed to create a drop down box
which contains all the employee names, but does not do anything when a name
is selected, and I can separately generate a report of all the employee's
details but not just one individual. How do I tell Access to find the
information stored in the table of employee details when one name is typed in
or selected? I have never used Visual Basic or SQL so I'm hoping there is a
way to do this without them.


Maybe you should start with the technique that uses a query
for the report's record source. Just set the criteria for
the name field to a reference to the combo box:

Forms![your form].[the combo box]

The command button wizard will generate the button's Click
event procedure to open the report.

There is another technique that is a little more general,
but it requires changing the wizard generated VBA code.
 
G

Guest

Thank you so much. I've been stuck on this all week and now it works
perfectly. I definitely need to learn how to set criteria properly.
Thanks again,
Hazel

Marshall Barton said:
drumwhindle said:
I've been given the task of designing a database of employees in Access 2003
and am very much learning as I go. What I want to do is have a button or drop
down box in a form which the user can type an employees name into, or select
one from a list, which will then take them to that employee's records so that
they can print a report. So far I have managed to create a drop down box
which contains all the employee names, but does not do anything when a name
is selected, and I can separately generate a report of all the employee's
details but not just one individual. How do I tell Access to find the
information stored in the table of employee details when one name is typed in
or selected? I have never used Visual Basic or SQL so I'm hoping there is a
way to do this without them.


Maybe you should start with the technique that uses a query
for the report's record source. Just set the criteria for
the name field to a reference to the combo box:

Forms![your form].[the combo box]

The command button wizard will generate the button's Click
event procedure to open the report.

There is another technique that is a little more general,
but it requires changing the wizard generated VBA code.
 

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