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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuous Data Form Issues

Status
Not open for further replies.

Bubbalouie

Technical User
Mar 25, 2009
107
US
I've got a form, Form2, I created from Design View. The Form is loaded when a user clicks a textbox on a different form, Form1. That textbox holds a value from the Employees table of the database I'm working with, Person_ID, and is dumped into a variable called EMPID.

I have a select statement that includes an inner join for the Employees table and a VolunteerInfo table, it's basically just:

SELECT e.first_name, e.last_name, vi.volunteerdate, vi.volunteeractivity FROM employees e INNER JOIN volunteerinfo AS vi ON e.Person_ID = vi.person_id
WHERE EMPID = e.Person_ID;

I would like to display the employee name and all volunteer records on Form2, kinda like:

Code:
Joe Schmoe
   09/31/08    Goodwill
   10/17/08    Childrens Hospital
   04/23/09    Community Kitchen

However, it will only display the employee name and one volunteer record at a time and makes me click a data control at the bottom of the page to show the next volunteer record. I've moved fields from header to detail section, set the form property 'Default View' to Continuous Form but just can't make it work.

Is the inner join statement the cause of my problems? Is there a way for me to rewrite it?

 
I'd replace this:
WHERE EMPID = e.Person_ID
with something like this:
WHERE e.Person_ID = [Forms]![Form1]![name of the textbox]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

... or return EmpID thru a function:
Code:
[blue]Public Function EmployID()
   EmployID = EmpID
End Function[/blue]
then:
Code:
[blue]   WHERE EmployID = e.Person_ID;[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Well, OK. I'll try both suggestions.

Is that gonna help the way the records are layed out? It pulls back the data now, it just that I don't want that crazy data control at the bottom of the form.

I want each record of volunteer information, every date they did something.
 
I don't want that crazy data control at the bottom of the form
Set the NavigationButtons property to False.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top