bkirkpatrick
Programmer
I am creating a Donations db and have a table and in this table, donators can be either a person or a business. Fields: LastName and FirstName make the “person” (via an expression) and the “business” is derived from field: BusinessName. a donator can only be one or the other. My dilemma is that I want to be able to down the road manipulate the data (ie alphabetical by LastName and BusinessName, and for sending mass thank you letters).
The only way I can think of doing this is creating a Field in this table called something like PrimaryName and then via VB code in the form (on some event or button I insert) force the PrimaryName field to be either the combination of the FirstName and LastName or just the BusinessName. This could be done by a trigger from a combo box on the form (cboDonatorType) which the user would select indicating whether it was a (1) Person or a (2) Business that made the donation.
The code is easy but am I making this too difficult?
The only way I can think of doing this is creating a Field in this table called something like PrimaryName and then via VB code in the form (on some event or button I insert) force the PrimaryName field to be either the combination of the FirstName and LastName or just the BusinessName. This could be done by a trigger from a combo box on the form (cboDonatorType) which the user would select indicating whether it was a (1) Person or a (2) Business that made the donation.
Code:
If me.cboDonatorType = 1 then me.PrimaryName = Me.FirstName&” “&Me.LastName
Else
Me.PrimaryName = BusinessName
The code is easy but am I making this too difficult?