Updating more than 1 record at a time

G

Guest

I need a way to save data from a text box on a form to more than one record
in a table.
For example, Table1 has fields:
PONumber
POLine
ContactName
PONotes
Closed

For each PONumber, there can be more than one POLine. The form is not bound
to Table1. I have a combobox "cboPONumber" that lists all the PONumbers where
closed=No.
I have a subform that lists in datasheet view all the POLines (where
Closed=No) associated to the PONumber selected from the cboPONumber.
Question: Because the other fields (ContactName and PONotes)are repeated for
each POLine, I want a method for the user to enter the information once in a
textbox and it is then saved for each related record automatically.
For example, if the ContactName = "Samantha" and there are 10 POLines (thus
records) for PONumber="P001" then, I want "Samantha" to be automatically
saved to all of the 10 records of PONumber.
(Pls keep in mind that this MsAccess database structure (table) is already
set and can not be changed.)
Any pointers are very much appreciated! Samantha
 
G

Guest

Samantha:
You may already know this, but you need two tables for a one-to-many
relationship. It breaks some of the cardinal rules of normalization to be
repeating data in the fashion you described. A "For Each" Loop would
accomplish what you are asking. But see if you can alter your table
structure. Better now than down the road.
 

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