Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub Form

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
US
I have a form that contains a subform. The subform contains a list of items (test types) that are pulled dynamically from one of my tables (TestType).

The idea is that the user can go through the list and check off as many test types as he/she wants. These values are then stored in a different table (Job_TestTypes) which tells which test types are associated with a particular job.

I didn't create the subform, but I want to make a change to it. Currently it lists all the items and a checkbox beside them, however at the bottom of the subform, after the last valid entry, is a line where the user can apparently enter a brand new entry to this table.

This is something that I don't want the user to be able to. Is there any way I can set up the subform to only display current data in the table and not allow the user to add a new entry to the table?

Does this make sense at all? Can somebody please help me?
 
Hooray, I figured it out! Apparently there is a value called "Allow Additions" on the sub form properties. I just set that to No and it all worked out. Thanks anyway!
 
Take a look at the AllowAdditions and AllowDeletions properties of the subform.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Striker

Probably the simplest way is to set the property "Allow Additions" to "No".

Open up the SubForm in design view with the properties window open ("View" -> "Properties")

Click on the "Data" tab on the properties window. You should see fields for RecordSource, Filter,...

Click on the field for Allow Additions, and select "No" from the pick list.

Since you don't want the end user to "add", you probably don't want them to delete also...

If you do not see the "Record Source"... fields, you have probably selected the properties for a field. To select the properties for the form, click on the subform in the top, left corner where the vertical ruler meets the horizontal ruler.

A gotcha. We don't know what type of form you are editing. So make a backup, and you may experience unexpected activity - the "idea" you explain is pretty neat which suggestion the original developer knew a thing or two about Access.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top