PC Review


Reply
Thread Tools Rate Thread

Combobox and Textbox settings

 
 
=?Utf-8?B?Q2hyaXMgR29yaGFt?=
Guest
Posts: n/a
 
      24th Dec 2006
hi,

what are the settings on a combobox to prevent the user editing entries
(the list of user names) that I've loaded using the "additem" method...if he
does edit his user name then it confuses the VLookup statement that the
combobox feed
when it changes. I've tried every setting under combobox and nothing seems to
prevent this.

I also require that the user type in his password into a text box when he
selects his user name from the combobox drop down. The text box for the
password has "Enter Password" loaded in to it when the combobox
changes...however it would be nice to have this text highlighted such that
when he types, he types immediately over it rather than having to delete
these words first.

again tried every setting for text boxes and used "set focus" to the text
box when the combo box changes...no luck...

thanks for your help...Chris
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      24th Dec 2006
Chris,

Change the Style property to 2, fmStyleDropDownList. You can do this at
design time or at run-time with code like

UserForm1.ComboBox1.Style = fmStyleDropDownList

This will prevent the user from change the value of the combobox to a value
that is not in the list.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Chris Gorham" <(E-Mail Removed)> wrote in message
news:45DA19D4-1079-489A-B055-(E-Mail Removed)...
> hi,
>
> what are the settings on a combobox to prevent the user editing entries
> (the list of user names) that I've loaded using the "additem" method...if
> he
> does edit his user name then it confuses the VLookup statement that the
> combobox feed
> when it changes. I've tried every setting under combobox and nothing seems
> to
> prevent this.
>
> I also require that the user type in his password into a text box when he
> selects his user name from the combobox drop down. The text box for the
> password has "Enter Password" loaded in to it when the combobox
> changes...however it would be nice to have this text highlighted such that
> when he types, he types immediately over it rather than having to delete
> these words first.
>
> again tried every setting for text boxes and used "set focus" to the text
> box when the combo box changes...no luck...
>
> thanks for your help...Chris



 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      24th Dec 2006
On your problem 2 of getting the textbox text to be highlighted use SendKeys
to change the focus from the combobox to the textbox.

Private Sub ComboBox1_Change()
Me.TextBox1.Text = "Enter Password"
SendKeys "{TAB}"
End Sub

Mike F
"Chris Gorham" <(E-Mail Removed)> wrote in message
news:45DA19D4-1079-489A-B055-(E-Mail Removed)...
> hi,
>
> what are the settings on a combobox to prevent the user editing entries
> (the list of user names) that I've loaded using the "additem" method...if
> he
> does edit his user name then it confuses the VLookup statement that the
> combobox feed
> when it changes. I've tried every setting under combobox and nothing seems
> to
> prevent this.
>
> I also require that the user type in his password into a text box when he
> selects his user name from the combobox drop down. The text box for the
> password has "Enter Password" loaded in to it when the combobox
> changes...however it would be nice to have this text highlighted such that
> when he types, he types immediately over it rather than having to delete
> these words first.
>
> again tried every setting for text boxes and used "set focus" to the text
> box when the combo box changes...no luck...
>
> thanks for your help...Chris



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
textbox and combobox JohnE Microsoft Access Form Coding 3 13th Mar 2010 07:56 PM
textbox to combobox C# newbie via DotNetMonster.com Microsoft C# .NET 4 14th May 2006 06:05 AM
combobox /textbox value =?Utf-8?B?ZmxvdzIz?= Microsoft Excel Misc 0 19th Apr 2006 03:18 PM
textbox and combobox alpapak via AccessMonster.com Microsoft Access Forms 2 29th Mar 2006 05:07 PM
Textbox and COmbobox =?Utf-8?B?dGlhZ28=?= Microsoft Access Forms 4 21st Mar 2005 09:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 AM.