By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 2,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

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

P: 99
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
Share this Question
Share on Google+
12 Replies


NeoPa
Expert Mod 15k+
P: 31,186
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

P: 99
Okay.If it is possible then how?I searched a lot but could not find any relevant idea.
Mar 17 '12 #3

NeoPa
Expert Mod 15k+
P: 31,186
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

P: 51
Expand|Select|Wrap|Line Numbers
  1. 'declare global variable
  2. Dim lastSrchs[] As String
  3. Dim i As Integer = 0
  4.  
  5. 'button click code
  6. lastSrchs[i] = textboxSearch.text
  7. i = i + 1
  8.  
  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

P: 51
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

NeoPa
Expert Mod 15k+
P: 31,186
Please review Before Posting (VBA or SQL) Code.

@rekedtechie
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

P: 51
@mod[NeoPa]

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

TheSmileyCoder
Expert Mod 100+
P: 2,321
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

NeoPa
Expert Mod 15k+
P: 31,186
Who's adamantly against use of the ComboBox Smiley?
Mar 18 '12 #10

TheSmileyCoder
Expert Mod 100+
P: 2,321
@NeoPa
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

P: 99
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

NeoPa
Expert Mod 15k+
P: 31,186
@HiGu
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.