select using Combo box but prevent editing?

Taurus05

Registered User.
Local time
, 23:37
Joined
Mar 29, 2005
Messages
31
Hi,

I am using the combo box in a form for selecting a report to be printed out. The source is a table with all the report names stored. I would like to prevent users from changing the data and yet they can can click on 1 single report they need. I cannot disable the allowedits in the combo box which will prevent the user from selecting. Is there a solution to this or should I use another method (if any). Thanks for any reply.
 
Hi,

You might want to try setting the combo box's "LimitToList" property to "Yes". This will force the user to select an option that is already in the list (by rejecting any text they type if it doesn't match an item already in the list).

Regards,
-Adam.
 
Thanks. That is a prettey good solution!
 
You can delete the table with your reports - it's not necessary. Access has a hidden collection of tables and you can use the data stored in the table called MSysObjects to retrieve the name of all your reports. All you need to do is open a new query, cancel the select tables dialog, and then switch to SQL View. Copy and paste the SQL code below and save the query as qryReports.

SELECT Name
FROM MSysObjects
WHERE Type = -32764
ORDER BY Name;
 

Users who are viewing this thread

Back
Top Bottom