Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2004, 12:29 AM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chacquard
Default ComboBox problem

Hi,

I have a form to enter orders. It is displayed in a continuous format. The first field is a combobox based on a query to display a list of tickets per event: TicketId, TicketNo, Event, Date, Time. When a selection is done, the TicketNo is displayed but the value is the TicketId.

the other fields of the form are based on the Order table: TicketId, OrderNo, Customer, PaymentSatus, DeliveryStatus, etc... When a ticket is selected in the combobox, the ticketId of the form is changed accordingly (on lost focus of the combobox).

If I want to add a new record, the comboboxes of all the displayed records are blanked. When I select a TicketNo in the combobox of the new record (or any other record), it's value is displayed in the comboboxes of all the displayed records. Luckily, the information previously entered are not edited in the Order table. The problem is only with the display.

I don't know where to look anymore... :(

Thank you!

Chantal



 
Old September 10th, 2004, 08:25 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Chantal!
If i have understood ur problem, u want to add new records to the same TicketNo
or new OrderNo,Customer,paymentstatus,...to a TicketNo u already have.If that is the problem u should make a form with a combo having the TicketTable as recordsource, and a subform with the OrderNo,... as the recordsource.Before u
add new orders to a TicketNo u send the present orders to an archive file.U will
have the subform empty to enter records related to a TicketNo.
Hope it helped u.
Regards Penta.

 
Old September 10th, 2004, 11:40 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

Chantal,
Try this:
What you have 2 tables:
tbl1)Ticket - Available ticket for an event.
fld1) TicketId (AutoNum)
fld2) TicketNo
fld3) Event
fld4) Date
fld5) Time

tbl2)Order - Tickets ordered from values in the Ticket table.
fld1) OrderNo (AutoNum)
fld2) TicketId
fld3) Customer
fld4) PaymentStatus
fld5) DeliveryStatus

On tbl2 (Order table) go to Design view
--> go to row fld2 (TicketId)
at the bottom, click on the Lookup tab,
then on the display control change it to Combo Box,
change Row Source to Ticket (meaning source from ticket table),
bound column should be 1, Column Count to 5, Column Heads to 5,
Column Widths to 0.75";0.75";2.5";0.75";0.75",
List Rows: 8"
List Width: 6"


You need to have a Query from Ticket & Order tables (qryOrders) with the ff fields. There is a link between TickeitId from Ticket table and Order table as one to many relationship.
qryfld1) OrderNo (Order table)
qryfld2) TicketId (Order)
qryfld3) TicketNo (Ticket)
qryfld4) Event (Ticket)
qryfld5) Date (Ticket)
qryfld6) Time (Ticket)
qryfld7) Customer (Order)
qryfld8) PaymentStatus (Order)
qryfld9) DeliveryStatus (Order)

Creat a new Form from wizard select AutoForm: Datasheet,
at the bottom choose the query you created above.

The default settings on the table desing are just suggestions.

Let me know if this works.
John







Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox Problem sfl234 C# 2 January 6th, 2007 01:22 PM
Combobox problem ajit Javascript 1 December 3rd, 2006 05:07 AM
Problem in ComboBox Tayyab326 ASP.NET 1.0 and 1.1 Professional 0 November 15th, 2006 03:03 AM
c# comboBox Initialization problem ColdFusion ASP.NET 2.0 Basics 1 May 11th, 2006 12:44 PM
problem about combobox nucharee General .NET 2 October 1st, 2004 04:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.