•
•
•
•
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
![]() |
•
•
Join Date: Jan 2005
Location: Houston, Tx.
Posts: 23
Reputation:
Rep Power: 4
Solved Threads: 0
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?
'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?
•
•
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation:
Rep Power: 7
Solved Threads: 107
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.
•
•
Join Date: Jul 2004
Location: Adelaide, Australia
Posts: 191
Reputation:
Rep Power: 5
Solved Threads: 1
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
Mark Nemtsas
Time and Billing Software - Time Tracking Software - Roller Shutters - Roller Blinds -
Baby Books
Time and Billing Software - Time Tracking Software - Roller Shutters - Roller Blinds -
Baby Books
•
•
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation:
Rep Power: 7
Solved Threads: 107
•
•
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation:
Rep Power: 7
Solved Threads: 107
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
- Why Data Structures???...QUESTIONS INSIDE (C++)
- error C2447: missing function header (old-style formal list?), what does this mean?! (C++)
- Fast data storage (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Help with creating a Calendar!!
- Next Thread: vb and excel password and username



Linear Mode