Table Edit

vvasudev

Registered User.
Local time
Today, 16:49
Joined
Oct 14, 2009
Messages
37
Hello,

I use the following code to open a table called Value_UAE that has three fields,


---------***CODE****--------------

Private Sub Command1_Click()
stDocName = "Value_UAE"
DoCmd.OpenTable stDocName, acViewNormal, acEdit
End Sub

---------***CODE****--------------

I need to change this code in such a way that the users can edit the Values in the table opened but cannot add a new record. I have noticed that the following code allows the users to both add and edit. I am a novice and any help would be appreciated


regards,

Vineeth
 
You have little to no control over what a user does directly in a table. Most of us only let users interact with forms and reports. I would create a form and open that for the user; you'll find the form has a number of properties you can manipulate to control what the user can and can't do.
 
Thanks for tat quick response.well i have thought about the form display and its sounds good.Well the problem is in my case the user experience would be much better if they get the table view as in the form view the user has to scroll through the various entries which may be time consuming at times. Is ter any oter solution to my problem.

thank you for ur quick reponse

cheers ,

Vineeth
 
In the form design view, click on the grey area and select properties; under "Data" set "Add New Records" to no. You can also set that form property from within VB, the same way you set any object property.

Edit: That property will apply whether the form is viewed as a datasheet or form.
 
That isn't really necessary, do exactly what I told you and your problem will be solved. You'll figure it out by the time you do it. You must create a form before you can manipulate a form, if that's your problem.
 
As i have written before, i wish to open up the table and not create a form, i want to basically not allow the users to add new redords to the table but allow them to just edit the existing. Creating a form view is not really feasible in my case.
 
As i have written before, i wish to open up the table and not create a form, i want to basically not allow the users to add new redords to the table but allow them to just edit the existing. Creating a form view is not really feasible in my case.
You cannot restrict users when they are in the tables. When they are in the tables they can do anything they like; PERIOD. You MUST use a form in order to restrict what they can do; PERIOD!
 
Ok great..seems like after all the only way is FORMS..thanks for all your sugestions and help

cheers,
Vineeth
 

Users who are viewing this thread

Back
Top Bottom