What controls should I be using to solve this? (1 Viewer)

Jordan76

Registered User.
Local time
Today, 08:57
Joined
Dec 26, 2002
Messages
49
I have a problem, I need the user to enter in 1+ passenger names, then I need the number of passengers to be automactically calculated so Billing is not skewed.

My problem is, I was using a large Text Box to store the multiple names, I thought I would be able to separate the values and count then by the number of enteries separated by "," but that didnt work. Does anyone have a suggestion what control would be the best to use, in order to count the number of names entered?

Also will I be using the count function?

Thanks in advance.

Sincerely,
Jordan
 

Rob.Mills

Registered User.
Local time
Today, 03:57
Joined
Aug 29, 2002
Messages
871
:confused: Little confused.

If you have to enter multiple names why don't you create a new record for each one?
 

Jordan76

Registered User.
Local time
Today, 08:57
Joined
Dec 26, 2002
Messages
49
A bit better explanation

Ok the DB is used to store invoices.

1 Single invoice can be used to purchase 3 plane tickets.

So I have 1 Box Passenger Information: (user enters the names of the passengers into this box, I am using a text box and currently they separate entries by commas)

Under that box I have another Text Box with # of passengers.
I need # of passengers to be automatically calculated based on the names entered into the Passenger information control.

Once calculated the # of passengers is used to calculate the price of the Invoice.



So the reason i dont have numerous entries is because I would like to store all passenger information in a single field in my Invoice Table. Since more then one passenger can be charged on 1 invoice.

Hope that helps.

sincerely,
Jordan
 

Rob.Mills

Registered User.
Local time
Today, 03:57
Joined
Aug 29, 2002
Messages
871
Why don't you try this. Create three different textboxes on the form each bound to a different field in the table. Create another field in your table that is the number of passengers.

On the form create a combobox where the user can select 1, 2, or 3 passengers. After the update run a procedure that will enable either 1, 2 or all of the textboxes for people to enter names.

Then you'll have an easy way to calculate the cost based on that combobox field.
 

WayneRyan

AWF VIP
Local time
Today, 08:57
Joined
Nov 19, 2002
Messages
7,122
Jordan,

I think you need something like the following:

Table Invoices:
InvoiceNumber
TravelDate
Destination
FlightNumber
TicketCost
Comments

Table InvoiceDetail:
InvoiceNumber
PassengerName (Combo box - Employees)

Table Employees:
EmployeeName

This will make for easier forms and reports. The Employee
table will reduce misspelled names.

hth,
Wayne
 

Jordan76

Registered User.
Local time
Today, 08:57
Joined
Dec 26, 2002
Messages
49
Thanks!

Ok gonna try some of the suggestions, thank you.
I was sort of hoping I could use a CountBlank Function like i did in Excel but I guess not:)

Thanks for the help.
sincerely
Jordan
 

Users who are viewing this thread

Top Bottom