Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newb ?: Populating a text box with results of a query

Status
Not open for further replies.

BullHalseyUSN

Technical User
Aug 28, 2003
72
US
Greetings, and apologies for the basic nature of this inquiry.

My dilemma is this. I am trying to understand how Access works. (That's a big topic...specifics below :))

I have a table MEMBER_INFORMATION that tracks employees and am trying simply to construct a form that displays all the members' names in a specific spot based on their role in the company.

In other words, for the president, I want to do a query that says, basically, "show me the information for the guy whose role is president."

The query, if it's important, looks at an option group and department name, and is able to show me one result. The result'd be displayed at the top of my org chart (obviously).

My database is outputting this org chart like a pro into a reports package. Just found out that certain customers must have the same org chart in an Access form.

So my form would ideally look like:

[results of first query]
|
[results of another query]

However, I am having trouble figuring out how Access views such things. It seems only to like having the data from one form or one single query on each form, and I think it'll be just ugly and silly to have to do 25 subfs. Also, I haven't done too much with suqQueries...is this the way to go?

Is there some input method on the form that allows the control source to be SQL you can just type in on the properties?

Will you please help if you can? Thanks very much.

BH





 
All right, thats alot of information to process there. So say for instance you basically want to be able to click an role like president, and all presidents within the company appear on the form??? Need more concise information in order to proceed further.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmm
 
Hi Doc,

My question is simple - I just made it sound complicated.

All I am trying to do is to make a form that represents my company structure and the form will pulled from my MEMBER_INFO table.

I don't really require guidance on the query: I have some experience with SQL and databases.

My question is, how can I populate text boxes in a form with the results of a query? Can I put the SQL into some part of the properties dialog?

The query itself is like this and there will be one of these for each employee:

SELECT [MEMBER_INFORMATION ].SALUTATION
FROM [MEMBER_INFORMATION ]
WHERE ((([MEMBER_INFORMATION ].DeptID)=1) AND (([MEMBER_INFORMATION].DeptHead)=1));





 
if you are doing this in access why dont use just use build form wizard, and click build from query. then follow the steps through. just an idea.
 
BigDog does have a point. Creat the query then goto form wizard and let that take care of the rest. But I kind of get this feeling that there may be more to it than a simple wizard.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top