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?

Recommended Answers

All 9 Replies

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.

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 :D

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 ;)

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

Truth Is, I didn't know that ms outlook had forms :confused:
More less The ability to figit with them. Something I'll have to look up.

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.

I am trying to make a 'Supervisor' field in an excel spreadsheet mandatory. They need to complete this field, then click on a "submit" button at the bottom of a different page in the spreadsheet. However, if the 'Supervisor' field is left blank, then a message box pop up that states," Supervisor name required for Submission." I am new to visual basic and have looked at tutorials but cannot figure out how to make this field mandatory so that the message box pops up. Any help would be appreciated. Thanks!

How about making your own thread instead of posting on one that is 4 years old?

How about making your own thread instead of posting on one that is 4 years old?

Sorry- I didn't mean to. I created my own thread for this. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.