i need to add a record but after that record is saved and locked to modify data (1 Viewer)

Doryas

Registered User.
Local time
Yesterday, 23:48
Joined
Jan 6, 2015
Messages
10
hi. i hope someone can help. pls excuse my english i didnt write or spoke for a looong time.
so this is my problem.
my boss ask me if i can design a database in acces. that can do things like this.
adding a record with a lot of fields. ( done it)
after i addet the record and and pushed the save record buton . that record cant be modified. and all the records previous addet cant be modified.
but when i push a button called modify entry i need it to modify data in only specific fields in that record but the other fields to stay locked.
after modifiing the data in those fields and when i push the save record button all the data to be saved and locked again.
i used the code for the form onload event
Me.AllowEdits = False
Me.AllowAdditions = True
Me.AllowDelitions = False

that when the data base is accesed all the previous records cant be modified.
but i wish that when i push the button ,,Modify entry,, i could modify data in specific fields in the record i select :)
cand anyone pls help me.
 

JHB

Have been here a while
Local time
Today, 08:48
Joined
Jun 17, 2012
Messages
7,732
MS-Access allows you to enable/disable and unlock/lock each control/ field in a form. You can have the code in the open event for the form or behind a button on the form
Code:
  Me.AllowEdits = True
  Me.FirstFieldName.Enabled = False
  Me.FirstFieldName.Locked = True
  Me.SecondFieldName.Enabled = False
  Me.SecondFieldName.Locked = True
  ...
  ..
 

Doryas

Registered User.
Local time
Yesterday, 23:48
Joined
Jan 6, 2015
Messages
10
So this code alows ne only to unlock a specific fielfield that i want to be modified after i push the modify button but the rest remain locked?even after i push save.?after i push save aal the fields will be locked until i push the modify button.:) i will tri it and i will come with the repkrerepkrepkrerelre
 

Doryas

Registered User.
Local time
Yesterday, 23:48
Joined
Jan 6, 2015
Messages
10
THANK YOU A LOT.
THAT WORKED. I DID ONE OF MY QUEST ș) NOW COMES THE HARDER ONES. THE REPORTS ș)) I MUST DO A FORM THAT WHEN I PUSH A BUTTON THAT REPORT MUST SHOW ME ONLY THOSE RECORDS THAT I WHANT.
ITS LIKE THIS.

MY FORM THAT ALOWS ME TO ADD RECORDS HAS SOME FIELDS
FOR EXAMPLE.

1 DATE OF REGISTRATION OF THE RECORD
2 DATE OF THE EVENT
3 AGENT ( THIS HAS A LOOKUP THAT CONTAINS THE NAMES OF THE AGENTS THAT I WANT TO SELECT ) AND
4. wHAT ISBEST FOR HIM ( THIS ALSO HAS A LOOKUP THAT CONTAINS 3 CRITERIAS)

i WHANT THAT THE REPORT SHOWS ME RECORDS BETWEN ONE DATE AND ANOTHER DATE( ONLY RECORDS REGISTERED BETWEEN THOSE DATES) BUT MADE BY AN AGENT THAT I SELECT FROM THE LOOKUP AND ANOTHER CRITERIA FROM THE SECOND LOOKUP.
WHAT I MUST DO ?
I DONT KNOW IF YOU CAN READ WHAT IVE WRITEN. SORRY ABOUT MY ENGLISH.
 

JHB

Have been here a while
Local time
Today, 08:48
Joined
Jun 17, 2012
Messages
7,732
Then base the report on query with your criteria in it!
 

Doryas

Registered User.
Local time
Yesterday, 23:48
Joined
Jan 6, 2015
Messages
10
Then base the report on query with your criteria in it!

can you show me how to do that pls?
at least how to start and from there i think i can manage.
 

Doryas

Registered User.
Local time
Yesterday, 23:48
Joined
Jan 6, 2015
Messages
10
thank you i will go see what is about.
I find somthing by playing with acces but a reference is better ș) i wil see that right away
 

Users who are viewing this thread

Top Bottom