Procedure for filling a form with with query result

J

Joe M.

I'm sure this is a simple question. I am trying to return the results of a
query to a form. So far I have been able to create a report from a query but
not been able to do something similar with a form. A simple example would be
to have a text box on a form where the user enters an employees ID#. There is
a query which pulls the employee data. After entering the empl # then the
Employee's name would be returned to another text box on the same form. I
suppose the query would be triggered by a cmd button. Can someone give me an
idea how this is done?

Thanks,
Joe M.
 
F

Fred

Joe,

Your post was not specific on what you are trying to do due to terminology
issues. Queries, Forms, Text boxes and reports are "windows" to data. not
places that you put/store data is. Data is in fields which are in tables.

That said, if you want to pick from a list and then load your selection into
a field, use a combo box in your form.
 
T

Tom van Stiphout

On Mon, 11 May 2009 06:14:01 -0700, Joe M.

The more typical scenario is where you have a form bound to a query on
the Employees table, and user uses Ctrl+F to find a particular value.

You can also have an unbound dropdown with employees (hidden ID,
visible Name) and in the <control>_AfterUpdate you can move the form
to the selected record. Benefit is that the user does not have to
remember meaningless ID values. Personally I never show these to end
users.

-Tom.
Microsoft Access MVP
 

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