Macro Code: Copy One set of fields to another set in same form

  • Thread starter Thread starter GeoK
  • Start date Start date
G

GeoK

Hi there -

Rather new to Access 2007 (Access in general, for that matter), and I'm
trying to create a macro that would copy address information from one set of
fields ("Legal Address") in a Form to another set ("Mail Address") in the
same Form upon checking a box. I've been fiddling with the macro screens but
can't quite seem to figure it out.

Would anyone be able to provide some insight?

Many thanks!
 
GeoK said:
Hi there -

Rather new to Access 2007 (Access in general, for that matter), and
I'm trying to create a macro that would copy address information from
one set of fields ("Legal Address") in a Form to another set ("Mail
Address") in the same Form upon checking a box. I've been fiddling
with the macro screens but can't quite seem to figure it out.

Would anyone be able to provide some insight?

Many thanks!

You will need to add code to several places in that form and never allow
anyone to update the fields in any other form or table.

I would suggest you just leave the fields blank and in the quewry driving
reports that use that information use calculated fields.

AddressToUse:IIF(fldUseLegalAddress = True, fldLegalAddress,fldMailAddress)
CityToUse:IIF(fldUseLegalAddress = True, fldLegalCity,fldMailCity)
 
Back
Top