Difficulty with form

S

Sandra

I have a form based on a Ticket Sales table, and it
contains a Patron form for getting a patron's name from a
table. In this form I have a another table as a subform
datasheet for Ticket Sales Detail for the tickets sold to
this patron. I am having difficulty setting up this
subform.
First I created a combo box based on the Ticket Master
List and once a ticket is selected it fills out the Class,
Row, Seat and Price fields in the Ticket Sales Detail
form. All works fine except that occasionally I must
change the ticket price for a student ticket. If I do
this in the Ticket Sales Detail then it also changes the
price in the Ticket Master List, which I do not want
changed.
I have also tried populating the fields using the column
values from the combo box, and this gets the data OK but I
can't change the price because that field is bound to the
column.
How do I get the field values from the Ticket Master List
table into the same fields as my Ticket Sales Detail table
without compromising the Master Ticket List and still be
able to edit the fields in the Ticket Sales Detail?

TIA,
Sandra
 
J

John Viescas

Sandra-

You need a separate SoldPrice field in TicketSalesDetail. Include the price
from TicketMasterList in the combo box row source. In the AfterUpdate event
of the combo box, copy that column value to SoldPrice. Let's say the price
is the 4th column in the combo row source. Your code would look something
like:

Me.SoldPrice = Me.TicketCombo.Column(3)

Note that the columns are numbered from zero.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR?pg=personal&fr_id=1090&px=1434411
 
S

Sandra

Thanks for the reply, I'll give that a try!
Sandra
-----Original Message-----
Sandra-

You need a separate SoldPrice field in
TicketSalesDetail. Include the price
 

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