Combo Box

S

Sue Wilkes

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.
 
S

Sue Wilkes

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.
 
B

Brendan Reynolds

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
 
S

Sue Wilkes

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
 
Top