Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox - advanced question

Status
Not open for further replies.

MrM121

Programmer
Aug 21, 2003
83
GB
Ok, first the basic part - I have a couple of comboboxes, the second is dependent on the output of the first - simple enough. I then want to be able to disable the second combobox until text is entered into the first (being typed). This is normally done through the afterupdate event, or if you just want to make sure there is text in the field, it can be done on the Change event. In Visual Basic, I know that just the Change event is required, but in Access it does recognise any difference in the field after the first keypress - i.e. If you setup the code to make the combobox blank when the control is empty, if you press backspace to delete the text, the second combobox will remain active. I know that this is because, for example, when pressing a key and finding the length of the combobox box, the len of the contents doesn't change until after the update.

Therefore, my question is very simple, and yet at the same time quite difficult - where is the text that is being typed being temporarily stored? I have been tempted to do an array for the keydown events, but this won't help to much if the text is highlighted and then deleted.

If you are wondering why I am simply not content with the afterupdate property, it is because I feel that Access could look/react better if this type of code was created.

Cheers
 
Well, now I feel like a right idiot, lol.

Yeah, works like a dream - with VBA I got so used to not having to write .text or .value, I had almost forgotten it existed!

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top