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

Access Report From Form

Status
Not open for further replies.

Brent113

Programmer
Aug 13, 2003
67
US
I need a report where the data is one record from two separate forms. The forms input into two tables, and I have constructed a query to pull them together (they have a relantionship already). I need just one record, and thought that I could make the query show the record if the its data matches that in the open form whose record I want. When run, the query comes up with no results, even though one record from the tables have to match the one from the form. Here is the SQL:

SELECT tblContact.FName, tblContact.LName, tblContact.Organization, tblContact.Address, tblContact.City, tblContact.State, tblContact.Zip, tblContact.DayPhone, tblContact.EvePhone, tblContact.Fax, tblContact.Email, tblContact.Website, tblNeeds.PanelSetA, tblNeeds.PanelSetB, tblNeeds.CaseA, tblNeeds.CaseB, tblNeeds.CaseC, tblNeeds.Location, tblNeeds.MoveIn, tblNeeds.MoveOut
FROM tblContact INNER JOIN tblNeeds ON tblContact.ID = tblNeeds.ID
WHERE (((tblNeeds.PanelSetA)=[Forms]![frmNeeds]![PanelSetA]) AND ((tblNeeds.PanelSetB)=[Forms]![frmNeeds]![PanelSetB]) AND ((tblNeeds.CaseA)=[Forms]![frmNeeds]![CaseA]) AND ((tblNeeds.CaseB)=[Forms]![frmNeeds]![CaseB]) AND ((tblNeeds.CaseC)=[Forms]![frmNeeds]![CaseC]) AND ((tblNeeds.Location)=[Forms]![frmNeeds]![Location]) AND ((tblNeeds.MoveIn)=[Forms]![frmNeeds]![MoveIn]) AND ((tblNeeds.MoveOut)=[Forms]![frmNeeds]![MoveOut]));


Any help is welcome to get the query return the record the form currently is showing. If anything else is needed just ask.


Thanks in advance,

Brent Scrivner
 
Brent - your query is welcome here but you may get a better response in one of the Access forums (esp Access forms)

Rgds, Geoff
[blue]Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?[/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top