469,299 Members | 2,080 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

How can I make intellisense appear as user types in a textbox in ms access 2007?

Is it possible for a textbox to predict phrase as user types in?I know comboboxes can make it happen but what if I want a text box to do the same and predict string?
Mar 16 '12 #1
12 3341
32,173 Expert Mod 16PB
It's probably possible, but would involve quite a bit of coding and handling of characters at a low, and detailed, level.
Mar 16 '12 #2
Okay.If it is possible then how?I searched a lot but could not find any relevant idea.
Mar 17 '12 #3
32,173 Expert Mod 16PB
It would involve building a database to handle the possibilities and managing keystrokes manually. This is so large a project that it is not an appropriate question for these forums. Having said that, it may not be clear how large a project it is without understanding what it involves, so I understand why you might ask it.

Essentially, this is much, much bigger/more complicated than you might have thought, and if you're asking for help at that level then I very much doubt you could handle it.

If you disagree, then the first step would be to do the consideration for the project of exactly what you would need in such a project. If you were to do a proper job of that then I suspect you'd start to understand why I say what I do.
Mar 17 '12 #4
Expand|Select|Wrap|Line Numbers
  1. 'declare global variable
  2. Dim lastSrchs[] As String
  3. Dim i As Integer = 0
  5. 'button click code
  6. lastSrchs[i] = textboxSearch.text
  7. i = i + 1
  9. 'textbox change code
  10. Dim isTriggerX As Boolean
  11. Dim chrToCompare As String
  12. Dim chrOflastSrch As String
  13. chrToCompare = Trim(txtboxSearch.text)
  14. isTriggerX = 0
  15. For x = 0 To i
  16. chrOflastSrch = Trim(lastSrchs[x])
  17. if chrOflastSrch = chrToCompare Then
  18. listboxRelated.add lastSrchs[x]
  19. listboxRelated.Visible = 1
  20. isTriggerX = 1
  21. End if
  22. If isTriggerX = 0 Then
  23. 'clear list.
  24. End If
  25. Next x
Mar 17 '12 #5
im not sure about this codes.. but i think array can be used as data storage.. if the system is closed the array will reset.
or else..
you are willing to save the array values in your database.. which is not good at all.. because theres a high posibility that you save nonsense data in your database. making your database crowded. =)
Mar 17 '12 #6
32,173 Expert Mod 16PB
Please review Before Posting (VBA or SQL) Code.

I have to disagree strongly with your analysis. Anything other than a table to store the information would be wholly inappropriate and would fail to manage and reflect previous usage. Managing the entries used only in the current session would be pointless, as the data across that session wouldn't even start to be worth the effort.

I can't say too much about the code except that we like compiled code here for good reason. Such code that is uncompiled and uncompilable tends only to mislead users. Even looking at it as pseudo-code I fail to see how it can be considered even as illustrating the fundamental logic required for this question. The obvious omission of any event procedures indicates clearly it cannot correctly handle the problem raised.

I'm not here to have a go at your code. I just felt it was important not to allow the idea that it is a viable solution to go unchallenged, as it misleads those less experienced and less capable members into following a dead-end path.
Mar 17 '12 #7

im sorry but i dont have PC at home..
i do all my school project at computershop, and that makes me 'ughh..' for the rest of my college life..
i need to bypass all security just to make my assignments..
thats the reason why its so hard being a poor..haha :))

-but thanks to your post now i know that i dont need to create a project that will save temp data..im trying to relate with vba.. because i saw macros before and its totaly looks like vb6.. =)
Mar 18 '12 #8
2,321 Expert Mod 2GB
I would like to know why you are so adamantly against using a combobox?

You can make a combobox act more like a textbox if that is what you require, and its far easier then making a textbox act like a combobox.
Mar 18 '12 #9
32,173 Expert Mod 16PB
Who's adamantly against use of the ComboBox Smiley?
Mar 18 '12 #10
2,321 Expert Mod 2GB
As I re-read the first post I see that the word "adamantly" is an exageration. I was merely wondering why HiGu would like to NOT use the combobox.
Mar 18 '12 #11
Hey.I am not against using a combobox.I know that would be easier in this case.I am a fresher in an IT company and a search textbox is what my clients have requested for.Now I see I will give them a combobox only with the features they want.Thank you all for a good discussion over this.I actually thought vba must have some built-in functions for this.
Mar 19 '12 #12
32,173 Expert Mod 16PB
I still believe it's unwise even to consider such an endeavour at your level of understanding. Ultimately it's your call of course.
Mar 19 '12 #13

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by refer_to_website | last post: by
49 posts views Thread by Allen Browne | last post: by
1 post views Thread by PatdeLux | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.