How to use Or in txrbox

S

sebastico

Hi
Working in a relational db in Access 2003 I have a continuous form (MyForm).
In Header section of the form I have an unbound txtbox control to enter
words separated by Or. After entering the word(s) user click a button to
trigger searching the word(s). My form is based on Allen's Browne search
example. Thus searching controls are in Header and founded records must be
displayed in form2 rather than in Details of the Myform.
 
J

John W. Vinson

Hi
Working in a relational db in Access 2003 I have a continuous form (MyForm).
In Header section of the form I have an unbound txtbox control to enter
words separated by Or. After entering the word(s) user click a button to
trigger searching the word(s). My form is based on Allen's Browne search
example. Thus searching controls are in Header and founded records must be
displayed in form2 rather than in Details of the Myform.

You can't pass an operator such as OR as a parameter to a query - only actual
data. If you want to pass multiple criteria you will need to actually build
the SQL string in code (and giving users the chance to enter any arbitrary SQL
string is probably unwise: http://xkcd.com/327/)
 
S

sebastico

John

In my Database there is a Table storing selected words. To simplify what I
need, lets say that I have seven tables:

Table1
OOBID (Primary Key wounded to Foreign Key in Table2 and Table4 and Table6 )
Field1
Field2
Field3
Field4

Table2
OOBID
WRDSID

Table3
WRDSID (Primary Key wounded to Foreign Key in Table2)
WRDSName

The selected words are stored in Table2. Records are displayed from Table1.
This means that once user enters one or several words in txtbox if such words
match with stored words, such records with fields from Table1 will be
displayed in the txtboxes in form (like Allen's Browne Search example).

Besides, I have more tables bounded to Table2.

Table4
FFAT
OOBID

Table5
FFAT (Primary Key wounded to Foreign Key in Table2)
FFATName

Table6
OOBID
SISTID

Table7
SISTID (Primary Key wounded to Foreign Key in Table2)
SISTName

I don't Know if with this design I can do what I need. If so, please let me
know. Your help is greatly appreciated

Thank you very much.
 

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