Discussion Locked

Access 2000 form/table design question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an Access table which keeps track of requests for information I get from my users. I am designing a form which will reference the user names, depts, etc. and put this into a drop-down box so that my assistant can select the relevant information from the list. Is there a way to remove duplicate names from the list in each field? Also, I want to be able to enter new data in each field via the form and have Access save that info so it will be there next time. How do I do this?

3 replies

by lumberjack

ok - couple of ideas.

there is a standard query - find duplicates, which can be alterred to delete duplicate records.
In the table design - index these fields and dont allow duplicates - this will ensure they dont re-occur

Make the details you want to save a part of a different table. Create a very simple form for this second table.
Now in the original Form - insert sub-form - and select the new simple form just created

You may have to play with the linking criteria so that it matches the data you wish to hold etc

by karen_terminiello

For the portion of your question related to presenting only the unique values in a drop down box ...
If on a form, or in the lookup properties in the design view of a table, you can designate the "combo box" control. Then you must specify the row source ...
What you'll want to do in the row source is select the table that has the field you want to dispay in the drop down; then click the "builder" button to the right (the "..." button)- This will invoke the query builder with the table you selected already at the top.
For the query that will feed into the drop down list you want to populate the query grid with the one field that you wnat to display (e.g., department) and most likely you'll want to set the sort order int he query grid too.
Then, in order to only display the unique values in the drop down, you want to right-click in a grey area in the top portion of the query builder to bring up the query properties dialog box. In this dialog box set the "unique values" property to "yes".
Close the query builder, save your table (or form) and give it a try ...
Oh, you'll also want to set the "limit to list" field property for the combo box to "no" ... this will allow you to enter values not already in the list.
The new vaules used as data in that field will become part of the list, but you may have to refresh the field in order to see the new values while you are working in the table or form.

by edd_polaski

Your answer is in two parts:
1) for the non-duplicating name information
2) info to be saved for future reference

Answers #1) after you create your ?ecanned?f combo-box open the properties box for this combo-box. Now look for the field that says ?gROW SOURCE?h. Click once on this line and your will see (thee dots) an epsilon button. Click this button to open the query you previously made with the combo-box wizard. When the query opens in the design view, look for the button on the menu bar that looks like a big Greek letter ?e???f . Now click this button once and then select ?eclose?f on the menu. When the query asks if you want to save the changes, answer yes and close the query builder. Now the most important, save your form. Your combo-box is now as you want. {The epsilon button tells the query to show only unique or different information and not to repeat anything that is the same.} Using a combo-box will limit what you can enter into this field so that future information can be controlled and the spelling will be the same.

Answer #2) This one is the easiest, just create a new table and have all of the fields that you want on the form to be in the table, be sure that you create an ?gID?h field and set it to ?eauto-number?f this helps with indexing. Now create a general query and have all of the fields listed, I find this helps when I want to sort my records in specific ways for the form. Now create your form then open the Properties box. In the field that says ?gControl Source?h either use the drop down box and select the new query or type the name of the query in to the field. This will tie your query to the form. Now you can add each field to your form using the ?efield-list button?f which is on the menu or insert generic fields from the ?etoolbox?f and tie them to the query. Now when you open your form, all of the previously save information will be listed and available for your use.

This discussion is closed to new replies.