Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Lock data entry in Form

Discussion in 'Information Technology' started by Jorg, Jul 28, 2006.

  1. Jorg

    Jorg
    Expand Collapse
    Guest

    I have a combo box - Status- with active-closed. when set to "closed" i want
    to lock the data entry for this record.
     
  2. Loading...

    Similar Threads Forum Date
    Debate With Sarbjeet Singh Dhunda At Turlock (California) Gurdwara, April 2015 - YouTube Gurmat Vichaar Apr 23, 2016
    Uk clocks go back Blogs Oct 17, 2015
    Kesh: Dreadlocks Questions and Answers Nov 20, 2013
    Obamacare Faces Near-Solid Block In The South Health & Nutrition Mar 31, 2013
    Malaysia Have you forsaken your flock, Archbishop? Malaysia News Update Breaking News Jan 30, 2013

  3. Barry Gilbert

    Barry Gilbert
    Expand Collapse
    Guest

    In the combobox's AfterUpdate event, put:

    Me.AllowEdits=(Me.Status = "Active")
    Me.AllowAdditions=Me.AllowEdits
    Me.AllowDeletions=Me.AllowEdit

    Barry

    "Jorg" wrote:

    > I have a combo box - Status- with active-closed. when set to "closed" i want
    > to lock the data entry for this record.
     
  4. Jorg

    Jorg
    Expand Collapse
    Guest

    Hi Barry,
    Thanks for your help, it works - but when I reopen the data base the record
    set to "close" can be edit again. Any further thoughts?
    jorg

    "Barry Gilbert" wrote:

    > In the combobox's AfterUpdate event, put:
    >
    > Me.AllowEdits=(Me.Status = "Active")
    > Me.AllowAdditions=Me.AllowEdits
    > Me.AllowDeletions=Me.AllowEdit
    >
    > Barry
    >
    > "Jorg" wrote:
    >
    > > I have a combo box - Status- with active-closed. when set to "closed" i want
    > > to lock the data entry for this record.
     
  5. Barry Gilbert

    Barry Gilbert
    Expand Collapse
    Guest

    When you say the record can be edited again, do you mean through the form or
    are you trying to edit it in the table?

    This code doesn't affect the ability to edit the record, it just changes
    properties on the form when the record is displayed. The code basically says,
    if the status column on the current record is "active", allow edits,
    otherwise don't.

    Barry

    "Jorg" wrote:

    > Hi Barry,
    > Thanks for your help, it works - but when I reopen the data base the record
    > set to "close" can be edit again. Any further thoughts?
    > jorg
    >
    > "Barry Gilbert" wrote:
    >
    > > In the combobox's AfterUpdate event, put:
    > >
    > > Me.AllowEdits=(Me.Status = "Active")
    > > Me.AllowAdditions=Me.AllowEdits
    > > Me.AllowDeletions=Me.AllowEdit
    > >
    > > Barry
    > >
    > > "Jorg" wrote:
    > >
    > > > I have a combo box - Status- with active-closed. when set to "closed" i want
    > > > to lock the data entry for this record.
     
  6. Barry Gilbert

    Barry Gilbert
    Expand Collapse
    Guest

    When you say the record can be edited again, do you mean through the form or
    are you trying to edit it in the table?

    This code doesn't affect the ability to edit the record, it just changes
    properties on the form when the record is displayed. The code basically says,
    if the status column on the current record is "active", allow edits,
    otherwise don't.

    Barry

    "Jorg" wrote:

    > Hi Barry,
    > Thanks for your help, it works - but when I reopen the data base the record
    > set to "close" can be edit again. Any further thoughts?
    > jorg
    >
    > "Barry Gilbert" wrote:
    >
    > > In the combobox's AfterUpdate event, put:
    > >
    > > Me.AllowEdits=(Me.Status = "Active")
    > > Me.AllowAdditions=Me.AllowEdits
    > > Me.AllowDeletions=Me.AllowEdit
    > >
    > > Barry
    > >
    > > "Jorg" wrote:
    > >
    > > > I have a combo box - Status- with active-closed. when set to "closed" i want
    > > > to lock the data entry for this record.
     
  7. Jorg

    Jorg
    Expand Collapse
    Guest

    Through the form. also once "closed†is applied all other records are also
    not edible.

    "Barry Gilbert" wrote:

    > When you say the record can be edited again, do you mean through the form or
    > are you trying to edit it in the table?
    >
    > This code doesn't affect the ability to edit the record, it just changes
    > properties on the form when the record is displayed. The code basically says,
    > if the status column on the current record is "active", allow edits,
    > otherwise don't.
    >
    > Barry
    >
    > "Jorg" wrote:
    >
    > > Hi Barry,
    > > Thanks for your help, it works - but when I reopen the data base the record
    > > set to "close" can be edit again. Any further thoughts?
    > > jorg
    > >
    > > "Barry Gilbert" wrote:
    > >
    > > > In the combobox's AfterUpdate event, put:
    > > >
    > > > Me.AllowEdits=(Me.Status = "Active")
    > > > Me.AllowAdditions=Me.AllowEdits
    > > > Me.AllowDeletions=Me.AllowEdit
    > > >
    > > > Barry
    > > >
    > > > "Jorg" wrote:
    > > >
    > > > > I have a combo box - Status- with active-closed. when set to "closed" i want
    > > > > to lock the data entry for this record.
     
  8. Barry Gilbert

    Barry Gilbert
    Expand Collapse
    Guest

    Ok. You should put this code in the form's OnCurrent event as well.

    Barry

    "Jorg" wrote:

    > Through the form. also once "closed†is applied all other records are also
    > not edible.
    >
    > "Barry Gilbert" wrote:
    >
    > > When you say the record can be edited again, do you mean through the form or
    > > are you trying to edit it in the table?
    > >
    > > This code doesn't affect the ability to edit the record, it just changes
    > > properties on the form when the record is displayed. The code basically says,
    > > if the status column on the current record is "active", allow edits,
    > > otherwise don't.
    > >
    > > Barry
    > >
    > > "Jorg" wrote:
    > >
    > > > Hi Barry,
    > > > Thanks for your help, it works - but when I reopen the data base the record
    > > > set to "close" can be edit again. Any further thoughts?
    > > > jorg
    > > >
    > > > "Barry Gilbert" wrote:
    > > >
    > > > > In the combobox's AfterUpdate event, put:
    > > > >
    > > > > Me.AllowEdits=(Me.Status = "Active")
    > > > > Me.AllowAdditions=Me.AllowEdits
    > > > > Me.AllowDeletions=Me.AllowEdit
    > > > >
    > > > > Barry
    > > > >
    > > > > "Jorg" wrote:
    > > > >
    > > > > > I have a combo box - Status- with active-closed. when set to "closed" i want
    > > > > > to lock the data entry for this record.
     
  9. Jorg

    Jorg
    Expand Collapse
    Guest

    Thanks Barry, that was it.

    "Barry Gilbert" wrote:

    > Ok. You should put this code in the form's OnCurrent event as well.
    >
    > Barry
    >
    > "Jorg" wrote:
    >
    > > Through the form. also once "closed†is applied all other records are also
    > > not edible.
    > >
    > > "Barry Gilbert" wrote:
    > >
    > > > When you say the record can be edited again, do you mean through the form or
    > > > are you trying to edit it in the table?
    > > >
    > > > This code doesn't affect the ability to edit the record, it just changes
    > > > properties on the form when the record is displayed. The code basically says,
    > > > if the status column on the current record is "active", allow edits,
    > > > otherwise don't.
    > > >
    > > > Barry
    > > >
    > > > "Jorg" wrote:
    > > >
    > > > > Hi Barry,
    > > > > Thanks for your help, it works - but when I reopen the data base the record
    > > > > set to "close" can be edit again. Any further thoughts?
    > > > > jorg
    > > > >
    > > > > "Barry Gilbert" wrote:
    > > > >
    > > > > > In the combobox's AfterUpdate event, put:
    > > > > >
    > > > > > Me.AllowEdits=(Me.Status = "Active")
    > > > > > Me.AllowAdditions=Me.AllowEdits
    > > > > > Me.AllowDeletions=Me.AllowEdit
    > > > > >
    > > > > > Barry
    > > > > >
    > > > > > "Jorg" wrote:
    > > > > >
    > > > > > > I have a combo box - Status- with active-closed. when set to "closed" i want
    > > > > > > to lock the data entry for this record.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page