Help with Query/Code for Donor Table

iouu2

New Member
Joined
Apr 15, 2011
Messages
14
We have two tables Donor and Donation.
Donor table consists of:
· DonorID, FirstName, LastName, Street 1, Stree2, City, State, Country, Zip and other personal information.
Donation table consists of:
· DonationID, DonorID, Date Received, Payment Method, Amoutn, ProgramID, CheckNumber
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
We are trying to create a query/code that will loop through our Donor table and look for a donors name, if that name is not found then a new random number is generated for the DonorID. If the name is found, the assigned DonorID number is inserted in the form/table.

Any advice/help is appreciated! :)
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Here's a thought - have a main form/subform set up with the main form consisting of the Donor table and then the donations as a subform. Then you don't have to do anything. All you have to do is to have an unbound combo to select the donor and then enter the donation information into the subform (the master/child links would be on DonorID and the form would automatically enter that into the donations table) and then to add a new Donor just navigate to a new record on the main form which you can then enter the donor information and any donation information quickly right from the same spot (in the subform).
 
Upvote 0

Forum statistics

Threads
1,224,547
Messages
6,179,436
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top