This is gonna another Weird question from me..excuse me though...:)

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, i have form that is linked to a table but not all the fields...
I want to update few fields with DAO Vba and some other field with DoCmd.RunCommand acCmdSaveRecord that is available in form macro...

I know no one will do this kind of thing but i want to know if it is possible to update this datas to same record[as in same row in the table...]

The main reason behind this is that I want my users only to added values but not retrive/view any data updated by someone else....When i link the form/all controls directly to table fields the users can click on next/ctrl + F and search for table data even from from [thats what i came to know]

Or my another question here would be to disable ctrl + F or make the form available only to add data to table and nothing else....no nothing..

Thanks for helping. And sorry if this is very silly question 'm asking...



Code:
[/FONT]
[FONT=Courier New]Private Sub Command25_Click()
'save
    Dim rst As DAO.Recordset
    Set rst = CurrentDb.OpenRecordset("REQUESTtb", dbOpenDynaset)
    rst.AddNew
     rst!DL_NBK_ID = Me.DLNBK
     rst!DL_NAME = Me.DLNAME
     DoCmd.RunCommand acCmdSaveRecord
    rst.Update
    rst.Close
    DoCmd.GoToRecord , "", acNewRec
End Sub
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Pedie

If you only want a form to be used for data entry sets it's Data Entry property to Yes.

If you don't want users to be able to change certain data in a record you can lock the relevant fields on the form.

That would allow them to see the data but not change.

Or if they don't need to see those fields just don't include them on the form.
 
Upvote 0

If you only want a form to be used for data entry sets it's Data Entry property to Yes.

If you don't want users to be able to change certain data in a record you can lock the relevant fields on the form.

That would allow them to see the data but not change.

Or if they don't need to see those fields just don't include them on the form.


Thnanks alot Norie. I want them to use the field to add data however i cant hide those fields i dont want them to see data/change/delete...because those fields are also used when adding data.

Thanks again


 
Upvote 0
Pedie

I'm sorry but that really doesn't make sense.

What do you want the user to be able to see?
 
Upvote 0

I'm sorry but that really doesn't make sense.

What do you want the user to be able to see?

Just the blank textboxes, comboboxes etc...but i dont want any table data to reflect in this textboxes, comboboxes etc in the form which is directly linked to form. Just add new data and click on save thats it. :)
 
Upvote 0
Did you try setting the Data Entry property to Yes as I suggested?
 
Upvote 0
Pedie

Basically it means that the user can only use the form for data entry.

However, if they enter more than one record they can code back to the record(s) they entered earlier.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,713
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top