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

How to display the result of an unbound form in a Report

Status
Not open for further replies.

wesmamas

IS-IT--Management
Dec 11, 2007
7
0
0
ES
When you are running a query from a form using an unbound form(in order to reference a value on that open form) using the "Forms!formname!controlname" syntax.

How could you display the result of that final query (criteria1=..., criteria 2=Forms!formname!controlname) on a Report?

Thanks in advance.
 
Hi wesmamas,
I think you can use the same query as the recordsource of your report, with the same reference to the form...


Pampers [afro]
Keeping it simple can be complicated
 
Hello Pampers,

the problem is that if I use the same query as the recordsource of my report, Once I execute my Report I have:

1) [Condition A] (TEXT BOX)-->OK
2) [Forms!formname!controlname] (TEXT BOX)-->NOK, cause I need the user to enter the data from the "combo box" that I defined in the Unbound FORM...

So If I execute the form:
I got the right implementacion but the wrong display (query display)...
(First condition: "text box" (criteria in query) and second condition "Combo Box"

But if I execute the Report with query as record souce:

I got a wrong implemetation but right display...

(First condition: "text box" (criteria in query) and second condition "Text Box" ([Forms!formname!controlname])

The real problem is that I cannot directly create a Report with the record source of the unbound form that I created...
 
I'm confused by what you are doing. You wrote:
When you are running a query from a form using an unbound form
Why are you "running a query from the form." What is the purpose. I'm also not understanding your description of what you are looking for in the report.

Can you try again with some sample data in the explanation?


Bob Larson
Free Access Tutorials and Samples:
 
hi wesmamas,
well i think i understand the problem, atleast i hope...

why dont u open the report from the form where u ask the users input?

Pampers [afro]
Keeping it simple can be complicated
 
Hi,

sorry for not repplying before but I was off on a business trip.

Pampers, that's exactly what I wanted to do... I wanted to know how do I open the report from the form where I ask the users input?
I know it may sound obvious but my access is a little bit rusty, and I only get the change to open the report from a table or a querry. Is there any VB command to do that.

thanks in advance...
 
DoCmd.OpenReport

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

Part and Inventory Search

Sponsor

Back
Top