Table with only 1 Row?

  • Thread starter MT DOJ Help Desk
  • Start date
M

MT DOJ Help Desk

Access 97

I have a table that has only one row. I have a form that allows the user to
edit the values in the table. However, I also want to prevent the user from
adding additional rows. Is there any way to do that?

--Tom
 
J

John Vinson

Access 97

I have a table that has only one row. I have a form that allows the user to
edit the values in the table. However, I also want to prevent the user from
adding additional rows. Is there any way to do that?

--Tom

Set some field (any field, doesn't matter) as the Primary Key, and put
a validation rule that it must be equal to its current value. If you
want to be able to change any of the fields, just add an Integer field
Primary Key, set it to 1, and set its validation rule to

=1

The Validation Rule will prevent any value other than 1; the Primary
Key will prevent adding two records both equal to 1.
 
M

MT DOJ Help Desk

Access 97

That's a good trick. It works for preventing the user from adding another
row to the table. However, the form that is used to update the values in
the table has a control at the bottom that allows the user to click forward
to the next record. This is a built-in Access control and is not a control
that I expressly added to the form. This control allows the user to attempt
to input another row of data, although the table won't save because of the
validation rule on the primary key. Ideally, I'd like to prevent the user
from even trying to add more rows. Is there a way to disable the control at
the bottom of the form that allows a user to click forward to the next
record?
 
R

RSGinCA

I don't know about Access 97, but on the properties for the form check for
"Allow Additions"... set it to 'No'. That will disable the 'addition'
capability of that built-in control. Another property "Navigation Button" (set
to 'No") will allow you to remove that control entirely.

Rick
 
M

MT DOJ Help Desk

Thanks for the response. Unfortunately, I don't see either of the form
properties that you mentioned, so it appears that Access 97 lacks this
ability.

--Tom
 
D

Douglas J. Steele

Access 97 has both properties. The Allow Additions property is on the Data
tab, while the Navigation Buttons property is on the Format tab (of course,
both of them are also available on the All tab)
 
M

MT DOJ Help Desk

The Data tab is blank, and the Format Tab lists only 10 properties, and the
Navigate Button property is not among them.

Maybe I'm looking at the wrong properties sheet. I'm going into the form
design, right-clicking the form without selecting an object on the form, and
then going to Properties. The resulting dialog box says, "Section: Detail"
at the top. Is that the right set of properties?

Could it be that these properties require the installation of an add-in?

--Tom
 
J

John Vinson

Maybe I'm looking at the wrong properties sheet. I'm going into the form
design, right-clicking the form without selecting an object on the form, and
then going to Properties. The resulting dialog box says, "Section: Detail"
at the top. Is that the right set of properties?

Hah! You're indeed looking at the wrong set of properties: that's the
properties *of the Detail section* of the form.

The properties of the Form itself can be found by opening the form in
design view and selecting View... Properties, or right mouseclicking
the little square at the upper left intersection of the rulers and
selecting Properties.
 
M

MT DOJ Help Desk

OK, now I see those properties. I knew that I was looking at the properties
for the detail section of the form, but I couldn't figure out how to get to
the properties for the form itself. I could swear that I tried going to the
View menu and selecting properties from there, but I guess I didn't, because
if I had I wouldn't have had to post the question here! Thanks for the
help.

--Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top