Problem with criteria

S

scrye

hi
I have a problem - i want to use a textbox as a criteria in query, but
not to be equal.
I mean that the textbox is part of the field
how can i do this
please help me
Marieta
 
G

George

First create the form with the unbound textbox, i.e. Combo1.

Create a query and on the SQL view copy and paste the following (delete any
text found already there):

SELECT Table1.FieldName
FROM Table1
WHERE (((Table1.FieldName) Like "*" & [Forms]![Form1]![Combo1] & "*"));

Replace Table1 with your TableName,
Replace FieldName with your Field name
If needed, replace Combo1 with your unbound text box.

Hope this will help,

Have a nice day

George



Ο χÏήστης "scrye" έγγÏαψε:
 
S

scrye

hi George thank you very much
but it didn't help
I'll explain you in details

I have a query that contains 3 fields from a table - Main_Table
and have a form, in which there is a textbox, that respond of the field
from Main_Table
i want when i write something in the textbox and push the button(i know
how to make it)
it's appear the query with 3 rows.
i can do this but the problem is that i don't know how to do when in
the textbox is not writen exactly the same as in teh field from the
table, and only part of it

If you can help me
Thank you
George напиÑа:
First create the form with the unbound textbox, i.e. Combo1.

Create a query and on the SQL view copy and paste the following (delete any
text found already there):

SELECT Table1.FieldName
FROM Table1
WHERE (((Table1.FieldName) Like "*" & [Forms]![Form1]![Combo1] & "*"));

Replace Table1 with your TableName,
Replace FieldName with your Field name
If needed, replace Combo1 with your unbound text box.

Hope this will help,

Have a nice day

George



Ο χÏήστης "scrye" έγγÏαψε:
hi
I have a problem - i want to use a textbox as a criteria in query, but
not to be equal.
I mean that the textbox is part of the field
how can i do this
please help me
Marieta
 
S

scrye

hi George thank you very much
but it didn't help
I'll explain you in details

I have a query that contains 3 fields from a table - Main_Table
and have a form, in which there is a textbox, that respond of the field
from Main_Table
i want when i write something in the textbox and push the button(i know
how to make it)
it's appear the query with 3 rows.
i can do this but the problem is that i don't know how to do when in
the textbox is not writen exactly the same as in teh field from the
table, and only part of it

If you can help me
Thank you
George напиÑа:
First create the form with the unbound textbox, i.e. Combo1.

Create a query and on the SQL view copy and paste the following (delete any
text found already there):

SELECT Table1.FieldName
FROM Table1
WHERE (((Table1.FieldName) Like "*" & [Forms]![Form1]![Combo1] & "*"));

Replace Table1 with your TableName,
Replace FieldName with your Field name
If needed, replace Combo1 with your unbound text box.

Hope this will help,

Have a nice day

George



Ο χÏήστης "scrye" έγγÏαψε:
hi
I have a problem - i want to use a textbox as a criteria in query, but
not to be equal.
I mean that the textbox is part of the field
how can i do this
please help me
Marieta
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top