User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 397,768 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,489 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 4162 | Replies: 6
Reply
Join Date: Jan 2005
Location: Houston, Tx.
Posts: 23
Reputation: dreyes67 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
dreyes67 dreyes67 is offline Offline
Newbie Poster

Make data from a pull down list mandatory

  #1  
Feb 1st, 2005
In my form I have a pull down that will display the names of all the clients. The users select a name, and it is entered in the field. But, then I have a few lazy Uses that will enter any thing to save time on their part. This is the Code I use for the field

'Retrieve Category info from table
Set rst1 = db.OpenRecordset("Work4number")
Set ctl = Item.GetInspector.ModifiedFormPages("Message").Controls("cboClient")
ctl.ColumnCount = 2
ctl.ColumnWidths = "40; 20 pt"

'Assign Access data to an array of 2 columns and 500 rows
CategoryArray(99, 2) = rst1.GetRows(500)
ctl.Column() = CategoryArray(99, 2)
'-=-=-=-=-=-=-

How can I make it so that they can only enter from the selected list and not type in a Client, even if the client name is correct?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Make data from a pull down list mandatory

  #2  
Feb 1st, 2005
In The Combo (or drop down) menu's keypress event, you trap the user typing. For example, you could, change keyascii to be the backspace character, or set the .text property to "". You could, display a message box that tells the user that keyboard input is a restricted function. The options are really endless.
Reply With Quote  
Join Date: Jul 2004
Location: Adelaide, Australia
Posts: 191
Reputation: mnemtsas is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
mnemtsas's Avatar
mnemtsas mnemtsas is offline Offline
Junior Poster

Re: Make data from a pull down list mandatory

  #3  
Feb 2nd, 2005
Is this an access form? If its a regular VB form then set the style of the dropdown to Dropdown List. If its an access form I have no idea
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Make data from a pull down list mandatory

  #4  
Feb 3rd, 2005
I believe there is a way in access, I just don't quite remember what it is. Setting the style (in vb) of the combobox to dropdown works too, I just like to warn users when they do something silly
Reply With Quote  
Join Date: Jan 2005
Location: Houston, Tx.
Posts: 23
Reputation: dreyes67 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
dreyes67 dreyes67 is offline Offline
Newbie Poster

Re: Make data from a pull down list mandatory

  #5  
Feb 3rd, 2005
This is MS Outlook form and I found the solution. I need to right-click on the field and go into Advance Properties. Select the Style and go from the default option 1 to the second option.

Thank you
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Make data from a pull down list mandatory

  #6  
Feb 3rd, 2005
Truth Is, I didn't know that ms outlook had forms
More less The ability to figit with them. Something I'll have to look up.
Reply With Quote  
Join Date: Jan 2005
Location: Houston, Tx.
Posts: 23
Reputation: dreyes67 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
dreyes67 dreyes67 is offline Offline
Newbie Poster

Re: Make data from a pull down list mandatory

  #7  
Feb 3rd, 2005
Lets see if I can either attach a picture of the MS Outlook form. This form is filled out by a inhouse User that is requesting Opertionas to convert a file sent by a Client from their format (software) to the formats that we us on our Mainframe.
Attached Images
File Type: jpg pc conversion pic.jpg (145.6 KB, 5 views)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 4:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC