Form Updating a Table

  • Thread starter Thread starter Sondra
  • Start date Start date
S

Sondra

I have created a table that contains the following:

DocumentID
Version
DocumentTitle
ObsoleteDoc
ObsoleteDate
ObsoleteReason
BinderA
BinderB
BinderC
etc...BinderABD

I have created an entry form for the information when
originally distributed to the binders
DocumentID
Version
DocumentTitle
BinderA
BinderB
BinderC
etc...BinderABD

Then I created an obsoletion form for the information when
it is no longer a valid procedure.

DocumentID
Version
DocumentTitle
ObsoleteDoc
ObsoleteDate
ObsoleteReason

I originally had toggle buttons for the binders on both
forms for the user to press when the document must go to
the binder.

But now I want to set it up so the user can Obsolete the
Document and it will automatically set the Binder YES/NO
option to NO. When a Document is obsolete it is obsolete
from all binders.

My first thought was:

Private Sub chkobsolete_AfterUpdate()

If Me.chkObsolete Then
Me.togBinderA = 0
Me.togBinderB = 0
Me.togBinderC = 0
Me.togBinderD = 0
....etc
End If
End Sub

But that is not working as we continue to add more binders.

Can someone help me to develop code that would
automatically update the table for those binders to NO
when the chkObsolete is pressed?

I know this isn't correct, bu I was thinking something
like this:
Private Sub chkobsolete_AfterUpdate()

If Me.chkObsolete Then
[MYTable]![BinderA] = 0
[MYTable]![BinderB] = 0
[MYTable]![BinderC] = 0
[MYTable]![BinderD] = 0
....etc
End If
End Sub

Any advise would be great.

Thanks in advance.




..
 
Is there any way that you would consider normalizing your table(s)? I can't
imagine the work it would take to add or remove a binder.
 
Back
Top