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
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