A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Klatuu -



 
 
Thread Tools Display Modes
  #1  
Old November 21st, 2006, 06:18 PM posted to microsoft.public.access.forms
accessdesigner
external usenet poster
 
Posts: 89
Default Klatuu -

how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?

  #2  
Old November 21st, 2006, 06:30 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Klatuu -

I'm not sure what you are trying to do. There would be nothing special about
a combo box to look up key words in a memo field. If you want to allow the
user to search on a defined set of words, then a combo box would be a good
way. You just set the row source type property of the combo to Value List.
Then create a list of all the words you want to search for. If the list is
large or you want it to be more dynamic, then you could make the row source
type table/query and have a table that is nothing more than a list of words
to search for. Using this method, it would also be possible to allow the
user to add new words to the list using the Combo's Not In List event.

To initiate the search, use the combo's After Update event to do the search:

If Instr(Me.txtMemoFld, Me.cboSearchWord) = 0 Then
MsgBox Me.cboSearchWord & " Not Found in Memo"
Else
'Do whatever you do when you find it
End If

"accessdesigner" wrote:

how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?

  #3  
Old November 21st, 2006, 06:30 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Klatuu -

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?



  #4  
Old November 21st, 2006, 06:46 PM posted to microsoft.public.access.forms
accessdesigner
external usenet poster
 
Posts: 89
Default Klatuu -

i want the user to type in any string length of words or phrases, not from a
predefined list, and have the combo box search a memo field that its field
name is listed in a query.... sort of like data entry, BUT it searches a memo
field that was entered from a different screen...

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




  #5  
Old November 21st, 2006, 06:46 PM posted to microsoft.public.access.forms
accessdesigner
external usenet poster
 
Posts: 89
Default Klatuu -

YES, HE REALLY IS CLAIRVOYANT..... kudooos

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




  #6  
Old November 21st, 2006, 07:35 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Klatuu -

Based on your last post, you should just use a text box rather than a combo
box. If the search is to be completely free form, there is no need for a
combo box.

I am not clairvoyant, I don't even know what I am thinking about most of the
time.

"accessdesigner" wrote:

YES, HE REALLY IS CLAIRVOYANT..... kudooos

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




  #7  
Old November 21st, 2006, 07:49 PM posted to microsoft.public.access.forms
accessdesigner
external usenet poster
 
Posts: 89
Default Klatuu -

well, ya reading my mind pretty well.... i was attempting a textbox, but i
still dont know how to use the statements correctly for that... the rest
works,.... this my last pain.... plz helpppp, send a working example based on
the strwhere statement...

"Klatuu" wrote:

Based on your last post, you should just use a text box rather than a combo
box. If the search is to be completely free form, there is no need for a
combo box.

I am not clairvoyant, I don't even know what I am thinking about most of the
time.

"accessdesigner" wrote:

YES, HE REALLY IS CLAIRVOYANT..... kudooos

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




  #8  
Old November 21st, 2006, 07:58 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Klatuu -

I don't know what you plan to do with it once you have it, but Doug Steele's
example is what you need.
SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyTextBox &
"*"

If you want to use strWhere, it would be:
strWhere = "LIKE *" & Me.MyTextBox & "*"



"accessdesigner" wrote:

well, ya reading my mind pretty well.... i was attempting a textbox, but i
still dont know how to use the statements correctly for that... the rest
works,.... this my last pain.... plz helpppp, send a working example based on
the strwhere statement...

"Klatuu" wrote:

Based on your last post, you should just use a text box rather than a combo
box. If the search is to be completely free form, there is no need for a
combo box.

I am not clairvoyant, I don't even know what I am thinking about most of the
time.

"accessdesigner" wrote:

YES, HE REALLY IS CLAIRVOYANT..... kudooos

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




  #9  
Old November 21st, 2006, 08:06 PM posted to microsoft.public.access.forms
accessdesigner
external usenet poster
 
Posts: 89
Default Klatuu -

how do u blend yours and Doug's statement together.....

the whole report goes something like this for every record:

date item# subject (so 3 fields) to do a query
on...

the date and item# is done, just need the user to be able to search by
subject...

"Klatuu" wrote:

I don't know what you plan to do with it once you have it, but Doug Steele's
example is what you need.
SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyTextBox &
"*"

If you want to use strWhere, it would be:
strWhere = "LIKE *" & Me.MyTextBox & "*"



"accessdesigner" wrote:

well, ya reading my mind pretty well.... i was attempting a textbox, but i
still dont know how to use the statements correctly for that... the rest
works,.... this my last pain.... plz helpppp, send a working example based on
the strwhere statement...

"Klatuu" wrote:

Based on your last post, you should just use a text box rather than a combo
box. If the search is to be completely free form, there is no need for a
combo box.

I am not clairvoyant, I don't even know what I am thinking about most of the
time.

"accessdesigner" wrote:

YES, HE REALLY IS CLAIRVOYANT..... kudooos

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




  #10  
Old November 21st, 2006, 08:14 PM posted to microsoft.public.access.forms
accessdesigner
external usenet poster
 
Posts: 89
Default Klatuu -

I tried this but it does not work:

strwhere = strwhere & "SELECT * FROM queryname WHERE [subject] = " &
Chr$(34) & Me.[SubjSearch] & Chr$(34)

"accessdesigner" wrote:

how do u blend yours and Doug's statement together.....

the whole report goes something like this for every record:

date item# subject (so 3 fields) to do a query
on...

the date and item# is done, just need the user to be able to search by
subject...

"Klatuu" wrote:

I don't know what you plan to do with it once you have it, but Doug Steele's
example is what you need.
SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyTextBox &
"*"

If you want to use strWhere, it would be:
strWhere = "LIKE *" & Me.MyTextBox & "*"



"accessdesigner" wrote:

well, ya reading my mind pretty well.... i was attempting a textbox, but i
still dont know how to use the statements correctly for that... the rest
works,.... this my last pain.... plz helpppp, send a working example based on
the strwhere statement...

"Klatuu" wrote:

Based on your last post, you should just use a text box rather than a combo
box. If the search is to be completely free form, there is no need for a
combo box.

I am not clairvoyant, I don't even know what I am thinking about most of the
time.

"accessdesigner" wrote:

YES, HE REALLY IS CLAIRVOYANT..... kudooos

"Douglas J. Steele" wrote:

Perhaps Klatuu is clairvoyant, and can understand your request, but for the
benefit of the rest of us, what exactly are you looking for?

Are you saying you want to let the user select a keyword from a combo box
(or be able to type it in if it doesn't already exist in the combo box) and
then select rows from the table where the keyword appears anywhere in the
memo field?

Your SQL will look like:

SELECT * FROM MyTable WHERE MyMemoField LIKE "*" & Forms!MyForm!MyComboBox &
"*"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"accessdesigner" wrote in message
...
how do create a combo box to allow
the user to type in keywords that is connected to a memo field within a
query? could u show me an example of one that works... using the strwhere
statement, but how is the combo setup, and its property fields?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.