Please Help!? Forms to Queries Parameter Value

A

A. Smart

I am looking to use a value entered into a form in a text box by the user,
that uses that value for query Criteria (Enter Parameter Value:). This query
will then be put out for a report. Is there an easy way of doing this?
Your help would be greatly appreciated.
 
O

Ofer

The query can have reference to the field in the form

Select * From TableName Where FieldName = Forms![FormName]![FieldName]

Or to reference a field in the sub form
Select * From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![FieldName]

that will filter the query with the vakue entered in the form
 
A

A. Smart

Im not sure why TableName is in there as the form doesn't link to a table. I
am still having trouble. I understand the basics of the expression i.e.

Query Field (Job No) must Select value From Field (JobNumber) in Form
(Select Progress Form).
Cheers
--
Regards

Ashley Smart


Ofer said:
The query can have reference to the field in the form

Select * From TableName Where FieldName = Forms![FormName]![FieldName]

Or to reference a field in the sub form
Select * From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![FieldName]

that will filter the query with the vakue entered in the form

--
I hope that helped
Good luck


A. Smart said:
I am looking to use a value entered into a form in a text box by the user,
that uses that value for query Criteria (Enter Parameter Value:). This query
will then be put out for a report. Is there an easy way of doing this?
Your help would be greatly appreciated.
 
O

Ofer

You can Ignore the Select ... From ... I provided you with
Just use the Where criteria in the query you created to link to the form

Where FieldName = Forms![FormName]![TextBoxName]
================================================
FiedName = The name of the field in the table you want to filter on
FormName = The name of the main form
TextBoxName = The text box name in the form where the user input the criteria.
===================================================
After you add this critera, run the form, input data in the text box and run
the query.
If the query works, base the report on this query


--
I hope that helped
Good luck


A. Smart said:
Im not sure why TableName is in there as the form doesn't link to a table. I
am still having trouble. I understand the basics of the expression i.e.

Query Field (Job No) must Select value From Field (JobNumber) in Form
(Select Progress Form).
Cheers
--
Regards

Ashley Smart


Ofer said:
The query can have reference to the field in the form

Select * From TableName Where FieldName = Forms![FormName]![FieldName]

Or to reference a field in the sub form
Select * From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![FieldName]

that will filter the query with the vakue entered in the form

--
I hope that helped
Good luck


A. Smart said:
I am looking to use a value entered into a form in a text box by the user,
that uses that value for query Criteria (Enter Parameter Value:). This query
will then be put out for a report. Is there an easy way of doing this?
Your help would be greatly appreciated.
 
G

Gil Lopes via AccessMonster.com

Sorry to bug in, but...

That replyes as "invalid syntax".
I'm trying something similar and it doesn't work.

Thanks for the help.

P.S. - Btw, mi expr is "(where fieldname = form![abertosrend]![selectfund]),
but i'm doing it on the query field.
You can Ignore the Select ... From ... I provided you with
Just use the Where criteria in the query you created to link to the form

Where FieldName = Forms![FormName]![TextBoxName]
================================================
FiedName = The name of the field in the table you want to filter on
FormName = The name of the main form
TextBoxName = The text box name in the form where the user input the criteria.
===================================================
After you add this critera, run the form, input data in the text box and run
the query.
If the query works, base the report on this query
Im not sure why TableName is in there as the form doesn't link to a table. I
am still having trouble. I understand the basics of the expression i.e.
[quoted text clipped - 17 lines]
 
O

Ofer

Hi Gil
In your where statement you put form instead of forms
Try ths
forms![abertosrend]![selectfund]
--
I hope that helped
Good luck


Gil Lopes via AccessMonster.com said:
Sorry to bug in, but...

That replyes as "invalid syntax".
I'm trying something similar and it doesn't work.

Thanks for the help.

P.S. - Btw, mi expr is "(where fieldname = form![abertosrend]![selectfund]),
but i'm doing it on the query field.
You can Ignore the Select ... From ... I provided you with
Just use the Where criteria in the query you created to link to the form

Where FieldName = Forms![FormName]![TextBoxName]
================================================
FiedName = The name of the field in the table you want to filter on
FormName = The name of the main form
TextBoxName = The text box name in the form where the user input the criteria.
===================================================
After you add this critera, run the form, input data in the text box and run
the query.
If the query works, base the report on this query
Im not sure why TableName is in there as the form doesn't link to a table. I
am still having trouble. I understand the basics of the expression i.e.
[quoted text clipped - 17 lines]
will then be put out for a report. Is there an easy way of doing this?
Your help would be greatly appreciated.
 
A

A. Smart

Didn't need the Where function, just used =Forms![FormName]![FieldName]
Thanx for your help.
--
Regards

Ashley Smart


Ofer said:
Hi Gil
In your where statement you put form instead of forms
Try ths
forms![abertosrend]![selectfund]
--
I hope that helped
Good luck


Gil Lopes via AccessMonster.com said:
Sorry to bug in, but...

That replyes as "invalid syntax".
I'm trying something similar and it doesn't work.

Thanks for the help.

P.S. - Btw, mi expr is "(where fieldname = form![abertosrend]![selectfund]),
but i'm doing it on the query field.
You can Ignore the Select ... From ... I provided you with
Just use the Where criteria in the query you created to link to the form

Where FieldName = Forms![FormName]![TextBoxName]
================================================
FiedName = The name of the field in the table you want to filter on
FormName = The name of the main form
TextBoxName = The text box name in the form where the user input the criteria.
===================================================
After you add this critera, run the form, input data in the text box and run
the query.
If the query works, base the report on this query

Im not sure why TableName is in there as the form doesn't link to a table. I
am still having trouble. I understand the basics of the expression i.e.
[quoted text clipped - 17 lines]
will then be put out for a report. Is there an easy way of doing this?
Your help would be greatly appreciated.
 
L

Lee

Ofer,
if you could help me
my posting is parameter in report two and could you answer my question. i
am a begininer and just looking for help. thanks

Ofer said:
The query can have reference to the field in the form

Select * From TableName Where FieldName = Forms![FormName]![FieldName]

Or to reference a field in the sub form
Select * From TableName Where FieldName =
Forms![FormName]![SubFormName].Form![FieldName]

that will filter the query with the vakue entered in the form

--
I hope that helped
Good luck


A. Smart said:
I am looking to use a value entered into a form in a text box by the user,
that uses that value for query Criteria (Enter Parameter Value:). This query
will then be put out for a report. Is there an easy way of doing this?
Your help would be greatly appreciated.
 
Top