Combo Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box on a form which is linked to a table created to populate
the list once all the data is entered all the data is then saved in another
table. What I need is for the user not to be able to enter any data into
this field only to select from the list. Many thanks for your assistance.
 
I have the property of limit to list to 'Yes' however if the user enters an
incorrect code the message regarding not in the list is displayed followed by
the error message 'microsoft access cannot find the macro 33023'. I do not
have any macro attached to this control. Could anyone please help me solve
this problem, many thanks Sue.
 
You could just change it to a list box. But if you really want to do it with
a combo box ...

Private Sub ReportsTo_KeyPress(KeyAscii As Integer)

If KeyAscii <> vbKeyEscape And KeyAscii <> vbKeyTab And KeyAscii <>
vbKeyReturn Then
KeyAscii = 0
End If

End Sub
 
Brendan, Thank you for the code, could you please tell me where I should
insert it (I tried using it on the events 'got focus' and 'on click' but I'm
still getting the error message). Regards Sue
 

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

Back
Top