Idiot needing Help ASAP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Duane explained to me how to create a form to select date range to create titles on charts and in forms, but I do not understand how to reference them in the query

I typ

forms!myformtitle!nameoftextbo

and it keeps saying error!

Am I missing a step??

This is so much harder than I thought. If someone could give me the code, but explain what it means so I understand more what i am doing so I can fix my own bugs that would be great!! Need to finish this in 2 hours.
 
The syntax you used works in VBA code. In the QBE editor,
use [Forms]![formname]![nameoftextbox]. Same language,
just a different dialect.

Rob

-----Original Message-----
Duane explained to me how to create a form to select date
range to create titles on charts and in forms, but I do
not understand how to reference them in the query.
I type

forms!myformtitle!nameoftextbox

and it keeps saying error!!

Am I missing a step???

This is so much harder than I thought. If someone could
give me the code, but explain what it means so I
understand more what i am doing so I can fix my own bugs
that would be great!! Need to finish this in 2 hours.
 
Tammy said:
Duane explained to me how to create a form to select date range to create titles on charts and in forms, but I do not understand how to reference them in the query.

I type

forms!myformtitle!nameoftextbox

and it keeps saying error!!

Am I missing a step???

This is so much harder than I thought. If someone could give me the code, but explain what it means so I understand more what i am doing so I can fix my own bugs that would be great!! Need to finish this in 2 hours.


That's perfectly legal syntax. You did replace the sample
names in the above example with the actual name of your form
and text box, right?

The form is open when the query is run, isn't it?
 
Actually, the form has to be open (with the values showing
up in the text boxes) before the query is run.

The query does not know enough to open the form. It just
looks in Access's universe for something named Forms!
formname!textboxname and grabs the value if it can see
it. If the form is not open, the query can't see it.

Rob
 
Okay then spell out the steps I need to undertake to open the form, then the query, then the report/.
 
In the database window (the thing that shows up when you
open Access, giving you the option of looking at tables,
queries, etc.), double click the form. Minimize it, or
press F11 to get the database window to the top. Double
click the query as you did for the form. Repeat as needed
for reports, etc.
Do I understand correctly that you are using a form to
input the parameters for a report. In other words, is the
idea to do something like specify a date range, and have
that date range appear in the report, as in "Sales from
4/1/04 to 5/1/04"? Once you get it functional this group
can certainly help make it smooth and efficient.
-----Original Message-----
Okay then spell out the steps I need to undertake to open
the form, then the query, then the report/.
 
YOU HAVE IT EXACTLY RIGHT!! i WANT THE DATE RANGE IN THE TITLE. ALL THE CHARTS WILL BE BASED ON THIS DATE RANGE. I JUST NEED TO KNOW HOW TO DO IT. EVERYONE HERE KNOWS HOW, I DO NOT UNDERSTNAD HOW TO LINK THEM ALL, SO THAT IT ONLY ASKS FOR THE DATE RANGE ONCE

YEAH!!! SOMEONE UNDERSTANDS ME!!!
 
YOU HAVE IT EXACTLY RIGHT!! i WANT THE DATE RANGE IN THE TITLE. ALL THE CHARTS WILL BE BASED ON THIS DATE RANGE. I JUST NEED TO KNOW HOW TO DO IT. EVERYONE HERE KNOWS HOW, I DO NOT UNDERSTNAD HOW TO LINK THEM ALL, SO THAT IT ONLY ASKS FOR THE DATE RANGE ONCE.

YEAH!!! SOMEONE UNDERSTANDS ME!!!

Tammy,

Here is how to run a report based upon a query (or several queries
based upon the same date range) that get's it's parameters from a
form.

Create an unbound form.
Add 2 Text Controls.
Name one StartDate and the other EndDate.

Add a command button.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In each query, in it's Date field's criteria line, write:

Between forms!ParamForm!StartDate AND forms!ParamForm!EndDate

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report. The form will display
and wait for the entry of the dates. Click the command button and the
report will run without need for any further parameter entries. When
the report closes, it will close the form. You never see the query.

I hope this gets you going in the right direction.
 
Thanks this helps ALOT!! On I go, my questions should be new ones now that I understand.
 
Back
Top