Combot Box Question

B

Bob

I have a Combo box that has a dropdown list of 2 selections. Row Source
"Active" "Finished"
And Default is Active so when I open a new form I get Active as my default.
But I can deleted out Active and type anything even leave it blank, Is there
anyway this combo can only show 2 selection Active, Finished not even be
left blank otherwise it will revert to Active.........Thanks for anybody's
help







..........Jenny Vance
 
T

Terry

Hi Bob,
In the property sheet for the combobox, select the Data tab, in there set
Limit to List = Yes. This will ensure that any other entry that is not in
the rowsource is rejected.

In the BeforeUpdate event check for an empty entry.

If IsNull(Me.myComboxBoxName) then
MsgBox "You must enter something here!"
Cancel = True
End If

The Cancel statement will not allow you to move out of the combobox unless
something has been entered.

Regards
 
B

Bob

Terry your a Genius thanks for your time and help much appreciated, Worked
perfectly .....Bob ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top