Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Combo Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sue Wilkes - 28 Nov 2006 11:00 GMT
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.
Sue Wilkes - 28 Nov 2006 11:42 GMT
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.

> 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.
Brendan Reynolds - 28 Nov 2006 11:48 GMT
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

Signature

Brendan Reynolds
Access MVP

>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.
Sue Wilkes - 28 Nov 2006 12:35 GMT
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

> You could just change it to a list box. But if you really want to do it with
> a combo box ...
[quoted text clipped - 13 lines]
> > 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.
Douglas J. Steele - 28 Nov 2006 13:10 GMT
Brendan's code tells you where to put it: in the KeyPress event.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> 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
[quoted text clipped - 22 lines]
>> > this field only to select from the list.  Many thanks for your
>> > assistance.
Sue Wilkes - 28 Nov 2006 13:30 GMT
Thank you Douglas, I feel such a nerd now but it works great, Sue

> Brendan's code tells you where to put it: in the KeyPress event.
>
[quoted text clipped - 24 lines]
> >> > this field only to select from the list.  Many thanks for your
> >> > assistance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.