Help with code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kufre

    #1

    Help with code

    I need some help on two problem I'm working on. First, I have an
    option group button with a checkbox called Inactive that allow me to
    open up a new blank form and input new record, but the problem with it
    is that once I input new record and save it, I can't go back to
    previous record, In order to view all my record, I have to close and
    reopen the form, this is the code I have so far:

    If Me!optFiling = 2 Then
    Me.DataEntry = True
    Else
    Me.DataEntry = False
    Second, I have a combo box called Disposition Code Row Source from
    tblDispositionC ode, I want if the user select one of the choice e.g "Do
    Not Pursue" or the field is left blank for the Inactive checkbox to be
    lock. This is what I have so far but not sure were to put it.
    IIf([Disposition Code] = "Do Not Pursue" Or [Disposition Code] is Null,
    Inactive.Lock = True).

    Thanks in advance

  • pietlinden@hotmail.com

    #2
    Re: Help with code

    If the Inactive checkbox is bound to your datasource, then use the
    OnCurrent event of the form to lock/unlock the records as necessary.
    Something like

    Form_OnCurrent( )
    If me.chkInactive= True Then
    Me.AllowEdits=F alse
    Else
    me.AllowEdits=T rue
    End If

    Man, that's UGLY!

    How about...
    Me.AllowEdits=N ot me.chkInactive

    Yeah, I like that MUCH better!

    Comment

    Working...