Moving data from one form to another

  • Thread starter Thread starter Meryl
  • Start date Start date
M

Meryl

Hi,

I have 2 tables - a prospective donor table of people I
mail out solicitations and a donor-registration table
that has the people who have made actual donations. When
someone makes a donation, I want to move the data from
one table (via a form) to the other. I read someone
else's post about this, but I'm getting a compile error.
I don't know VBA, so I'm muddling in the dark. Can you
look at this and see what I am doing wrong? Do I need a
DoCmd statment for every field that I am moving? Here is
my code so far


stDocName = "2003 Individual Donations"
DoCmd.OpenForm "Donor-Registration Form-US", acNormal
DoCmd.GoToRecord , , acNewRec
Forms!Donor-Registration Form-US.FirstName(s).Value =
Forms!Prospective-Donor-Reg-Test.First Name(s).Value



Thx.
 
Hi,

I have 2 tables - a prospective donor table of people I
mail out solicitations and a donor-registration table
that has the people who have made actual donations. When
someone makes a donation, I want to move the data from
one table (via a form) to the other. I read someone
else's post about this, but I'm getting a compile error.
I don't know VBA, so I'm muddling in the dark. Can you
look at this and see what I am doing wrong? Do I need a
DoCmd statment for every field that I am moving? Here is
my code so far


stDocName = "2003 Individual Donations"
DoCmd.OpenForm "Donor-Registration Form-US", acNormal
DoCmd.GoToRecord , , acNewRec
Forms!Donor-Registration Form-US.FirstName(s).Value =
Forms!Prospective-Donor-Reg-Test.First Name(s).Value



Thx.

Since your form and control names have blanks and special characters
(hyphens and parentheses) you must enclose them in square brackets.

I'd suggest a different approach: rather than moving data from form to
form, you can move it from table to table using an Append query,
called from your form and using the Primary Key of the table as a
criterion (pulled from the form).

Even better might be to use just a single People table with a field
indicating whether this person is a solicitation recipient or a donor,
or just have a donations table related to the people table - storing
the same information in two different tables may not be the best
design!
 
Back
Top