Automatic bring to zero when we edit the member type

  • Thread starter Frank Situmorang
  • Start date
F

Frank Situmorang

eHello,

By the help of the good people in this forum I was able to make an automatic
generated Reg.No in my church membership database.

But when we come to edit the member type, it can not automatically nulify
the field ( register no.). For your info, we have 2 kinds of membership.
Aggota Jemaat means it was baptized, needs register no. the 2nd one Anggota
SS/Sabbath School member, nees no Reg. no.)

Suppose the secretary realized later(because of mistyped) that Mr. A is not
baptized then he changed the member type ( Angtype) and we want it zeros
again this field. WE WANT THE SYSTEM IN THE NEXT FILL, system will suggest
this unused number ( because it is in the middle of the many records now.

What is the VBA, is it quite complicated? Should we use combo to browse
manually all the Reg numbers?

This is the VBA and it works when we add the records but it can not zero
back if we edit this record by member type.

Private Sub AngtType_AfterUpdate()
If AngtType = "Anggota Jemaat" Then
NoInd = Nz(DMax("[NoIn]", "bukuangkby")) + 1
End If
If Not IsNull(Me.[AngtType].OldValue) Then
If Me.[AngtType] <> Me.[AngtType].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo + vbDefaultButton2 + vbQuestion) = vbNo Then
' Undo the changes
Me.AngtType = Me.AngtType.OldValue
End If
End If
End If
End Sub

I appreciate anyone helps. this is the only thing left in my project,

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top