N
Niklas Östergren
Hi!
I´m about to finish a entry wizard in my application when I came to think of
one scenario that the user might want to handle.
The wizard is helping the user to registrate a person as a member in out
assosiation. In the first form (frmNewMemberApplyRegistration, recordsource
= tblPerson) the user enters the persons name, address etc. In the second
form (frmNewMemberRegistration, recordsource = tblMember) the user enters
all member data such as MemberNo, the date the person joined the
assosiation. And in the third form (frmNewMemberShipRegistration,
recordsource = tblMemberValidation) the user enters membership data, such as
type of membership (single, family, etc.), expire date etc.
The relationships between the tables are as follows:
tblPerson....................................tblMemberValidation............
..................tblMember
PersonID (PK) (One------Many)...fkPersonID
.......................................................fkMemberID
(Many----------One) MemberID (PK)
My wizard works just fine all the way (I have more form´s then I have
declared here). And the user can step forward and backwards in the wizard
and finish when ever they wants to. So what´s my problem then?
Well, in hte first form the user can only enter ONE record (ONE FirstName,
ONE LastName etc.) but if the person wants to applye for a family membership
then the user needs to register several names, which isn´t any problem (I
havn´t created this part yet but it will not be any problem).
Today I use several global variables (like glngNewPersonID as Long,
glngNewMemberValidation as Long and glngNewMemberID) to store each new
record so I can delete them when neded to (when the user go backwards
(cmdPrevious) in the wisard or abort (cmdAbort) the wizard. Her´s my Q:
How do I solve the problem with several persons in tblPerson and several new
memberships in tblMemberValidation end so on?
I know one way of doing it but I think there might be a smother solution.
The one that I know of is to create a seperat table in which I store all the
primary keyes needed for the wizard and name the records with what type of
primary key it is and then loop throug this table and delete all records in
tblPerson where stored primary key for <PersonID> = tblPerson.PersonID.
Isn´t there a smother (better way of doing this. How about using an array to
store the primary keyes in? Is that possible (better)?
I have never used an array and doesn´t know how to. I have several good
books so I´ll be able to read and learn. But is this the way to go, or???
TIA!
// Niklas
I´m about to finish a entry wizard in my application when I came to think of
one scenario that the user might want to handle.
The wizard is helping the user to registrate a person as a member in out
assosiation. In the first form (frmNewMemberApplyRegistration, recordsource
= tblPerson) the user enters the persons name, address etc. In the second
form (frmNewMemberRegistration, recordsource = tblMember) the user enters
all member data such as MemberNo, the date the person joined the
assosiation. And in the third form (frmNewMemberShipRegistration,
recordsource = tblMemberValidation) the user enters membership data, such as
type of membership (single, family, etc.), expire date etc.
The relationships between the tables are as follows:
tblPerson....................................tblMemberValidation............
..................tblMember
PersonID (PK) (One------Many)...fkPersonID
.......................................................fkMemberID
(Many----------One) MemberID (PK)
My wizard works just fine all the way (I have more form´s then I have
declared here). And the user can step forward and backwards in the wizard
and finish when ever they wants to. So what´s my problem then?
Well, in hte first form the user can only enter ONE record (ONE FirstName,
ONE LastName etc.) but if the person wants to applye for a family membership
then the user needs to register several names, which isn´t any problem (I
havn´t created this part yet but it will not be any problem).
Today I use several global variables (like glngNewPersonID as Long,
glngNewMemberValidation as Long and glngNewMemberID) to store each new
record so I can delete them when neded to (when the user go backwards
(cmdPrevious) in the wisard or abort (cmdAbort) the wizard. Her´s my Q:
How do I solve the problem with several persons in tblPerson and several new
memberships in tblMemberValidation end so on?
I know one way of doing it but I think there might be a smother solution.
The one that I know of is to create a seperat table in which I store all the
primary keyes needed for the wizard and name the records with what type of
primary key it is and then loop throug this table and delete all records in
tblPerson where stored primary key for <PersonID> = tblPerson.PersonID.
Isn´t there a smother (better way of doing this. How about using an array to
store the primary keyes in? Is that possible (better)?
I have never used an array and doesn´t know how to. I have several good
books so I´ll be able to read and learn. But is this the way to go, or???
TIA!
// Niklas