RE: Form Code to update the table
- From: kay <kay@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 Nov 2009 07:16:01 -0800
Thanks for the quick reply.
All these suggestions are helpful. But still that is not the solution I am
looking for.
As I do not want user to see how many and what records are there in the
table, but at the same time if they enter ResourceID (unique –PK) they should
be able to view the details for that ID. So its not about adding new data,
its about updating existing data and keeping track of the updates.
Data is already there in the table, user will be updating data and adding
comments to the table.
So here the picture of the form I am trying to design. (this is the simple
way I have not made fancy yet, once code and everything is set up, I will try
to look it fancy)
First – I have created the blank table ‘tblResources’ – data entry coming
from ‘frmResources’ will be stored in this table.
User will have access to ‘frmResources’. So when they enter ID the related
fields details will pop up – comments, date, ..etc.
At the bottom of the form I have created two buttons – update and Exit.
So if user needs to update the information ( for eg. Update the comments)
they will change in the form and then when they click on update – it should
save the update into the table and whey they click on Exit – the
form(application) will just quit without saving the change.
Sorry for making it complicated but this is what I am trying to design it.
appreciate your help.
Thanks
"Jack Leach" wrote:
set the DataEntry property of the form to True... this lets them add new.
records only and not view any existing ones.
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"kay" wrote:
Thanks,
I tried this way but what happens that first time when the table was blank
it worked fine. when you enter data in forms it goes to table but next time
when you open the form it shows previous entries and that i do not want to
show to user.
they should not know what is there in the table.
hope i am able to explain my point.
"kismert" wrote:
You are working too hard. You want a "bound form" to do the work for you.
You do this by binding the form to the table via a query:
1. Make a query, qryResources, which returns all the fields in table
Resources, (Why? call it good practice)
2. In your form, set the Recordsource property to qryResources.
3. For each control in the form, set the Control Source to the appropriate
field in the query.
There! You now have a basic form that will read and write data to a table.
Of course, there is a lot more twiddling you will want to do with the form
properties to get something close to what you want, but I leave you with your
perseverance and the trusty F1 key.
-Ken
- Follow-Ups:
- RE: Form Code to update the table
- From: kay
- RE: Form Code to update the table
- References:
- Form Code to update the table
- From: kay
- RE: Form Code to update the table
- From: kismert
- RE: Form Code to update the table
- From: kay
- RE: Form Code to update the table
- From: Jack Leach
- Form Code to update the table
- Prev by Date: Re: form filter
- Next by Date: Automatically update a text field when any entry changed
- Previous by thread: RE: Form Code to update the table
- Next by thread: RE: Form Code to update the table
- Index(es):
Relevant Pages
|