Copy data of some fields on a form to the next record

G

Guest

I have a form used to enter data on a record in which 7 of the fields will
contain the exact same data for several sebsequent records. Instead of
having to re-enter repetative data for several sebsequent records, I need a
checkbox (or some indicator) that would set a control that when checked, it
would tell the database that it should carry the data in a certain set of
fields (the 7) to the next record. For instance, when you order an item
online using a credit card and if you check the box the delivery address
information you just entered will repeat or copy to the billing address
fields. It would work sort of like that. If the checkbox is checked then
the 7 fields included in the checkbox group would repeat or copy the data to
the next record. If the checkbox is unchecked, then the fields in the next
record would all be blank. Can anyone help me with this?

Thanks!

Kass
 
J

Jeff Boyce

Kass

What you are describing doing (copy address to next record) is what you
would need to do ... if you were using a spreadsheet! You won't get the
best out of Access' relationally-oriented features/functions if you insist
on feeding it 'sheet data.

Is there a reason you aren't doing this in Excel (not that I'm suggesting it
would be appropriate)?

If you want to do this in Access, I'd suggest you take a look at the
Northwind database that comes as a sample with Access. In a relational
database, you'd have one table for customer info (including address), one
table for Orders, and one table for Order Details (each item ordered).

You would NOT need to repeat the address for each item because the customer
would be associated with the Order, not the detail.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Use command button to call a macro. Have macro to Set Value to not-visible
text boxes for the data to carry to new record. Same macro adds new record
and Set Value from not-visible text boxes to new record fields.

Post back if more explaination is needed.
 
G

Guest

Why use a macro?
Just set the default value property of each bound control you want to carry
forward to it's current value:

Me.txtWhizzar.DefaultValue = Me.txtWhizzar

Use the command button to set the values, then open a new record with
Docmd.GotoRecord , , acNewRec

With that said, I will have to agree with Jeff. Those fields you need to
repeat should be a parent record to records with the non repetitive fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top