G
Guest
thanks in advance..
I'm doing a manifest for a theatre, so have entries for ticket buyers like: name, row,1st seat to last sea
need to break out each seat by individual buyer: name, row, 1st sea
name, row, 2nd sea
name, row, 3rd seat etc...
did a for...next statement with .AddNew that breaks down for one buyer and adds to table, but can't get it to loop to next ticket buyer. tried looping with EOF, but that goes on an endless loop always adding to the ones I've added.....any ideas
Option Compare Databas
Option Explici
Sub fleshoutseats(
Dim db As DAO.Databas
Dim rs As DAO.Recordse
Set db = CurrentD
Dim buyername As Strin
Dim sectionname As Strin
Dim fromseat As Varian
Dim toseat As Varian
Dim toseatend As Varian
Dim rowname As Varian
Dim seat As Varian
Set rs = db.OpenRecordset("THEATRE", dbOpenDynaset
With r
..MoveFirs
Do Until rs.EO
buyername = rs![BUYER NAME
sectionname = rs!Sectio
fromseat = rs![FROM SEAT NUMBER
toseat = rs![to SEAT NUMBER
toseatend = rs![to SEAT NUMBER] -
rowname = rs!Ro
For seat = fromseat To toseatend Step
..AddNe
rs![BUYER NAME] = buyernam
rs!Section = sectionnam
rs!Row = rownam
rs![FROM SEAT NUMBER] = fromseat +
rs![to SEAT NUMBER] = tosea
rs.Updat
fromseat = fromseat +
Next sea
..MoveNex
Loo
End Wit
End Su
I'm doing a manifest for a theatre, so have entries for ticket buyers like: name, row,1st seat to last sea
need to break out each seat by individual buyer: name, row, 1st sea
name, row, 2nd sea
name, row, 3rd seat etc...
did a for...next statement with .AddNew that breaks down for one buyer and adds to table, but can't get it to loop to next ticket buyer. tried looping with EOF, but that goes on an endless loop always adding to the ones I've added.....any ideas
Option Compare Databas
Option Explici
Sub fleshoutseats(
Dim db As DAO.Databas
Dim rs As DAO.Recordse
Set db = CurrentD
Dim buyername As Strin
Dim sectionname As Strin
Dim fromseat As Varian
Dim toseat As Varian
Dim toseatend As Varian
Dim rowname As Varian
Dim seat As Varian
Set rs = db.OpenRecordset("THEATRE", dbOpenDynaset
With r
..MoveFirs
Do Until rs.EO
buyername = rs![BUYER NAME
sectionname = rs!Sectio
fromseat = rs![FROM SEAT NUMBER
toseat = rs![to SEAT NUMBER
toseatend = rs![to SEAT NUMBER] -
rowname = rs!Ro
For seat = fromseat To toseatend Step
..AddNe
rs![BUYER NAME] = buyernam
rs!Section = sectionnam
rs!Row = rownam
rs![FROM SEAT NUMBER] = fromseat +
rs![to SEAT NUMBER] = tosea
rs.Updat
fromseat = fromseat +
Next sea
..MoveNex
Loo
End Wit
End Su