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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|