Adding new records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I have a quantity field that if I enter, say, 10,
this would then automatically add the same
record 10 times.

Is this possible, if so, how?
Help would be appreciated
 
Izzy

You've described what you want to do (add multiple rows). Now, how 'bout
why? It may be that there are alternatives the 'group's readers can offer,
if we knew what business need you are trying to solve by adding, say, 10
identical rows.
 
I am adding parts for sale, each part
has a unique part number and a tag
printed and attached to it. If I order
in 10 of the same parts I want to add
10 identical records, giving a unique
tag for each showing the part number.
My "Parts" table ID field (autonumber and
(PKey) generates the tag number.

I hope this helps
With thanks
 
Izzy

One approach would be to add code that loops as many times as the number
(10) you enter, each time adding a record. You'd need to nail down the
exact syntax, as the following is aircode:


strSQL = "INSERT ... " 'this is the sequel statement that defines what
will be inserted/added

For intCounter From 0 to Me!txtYourCounterField -1 'this is the loop
CurrentDB.Execute strSQL, dbFailOnError
Next intCounter

(your syntax may vary...)
 
Back
Top