Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program w/reservations, HOW TO SEARCH NAMES W/RESERVATIONS

Status
Not open for further replies.

THEJOESTER

Technical User
Jul 6, 2006
39
US
Hi, I am building just a single database for every person that rides on a railroad. I set my form up to be two tabs "Selling Tickets" and "Making Reservations". In reallity these are going to be similar forms but what i need to be able to do is have the reservation form input people making reservations into the table.

But on the other end i need people that are selling tickets to look for the people who have made reservations look at how many people they made that reservation for and put those values into to the text boxes so they can sell their tickets. The thing is i need to destinguish what time and day they are going on too. For example, say there are two Johnsons, one had a reservation for today and the other had a reservation for August 13,2006. The form would need to distinguish the dates, i would want the one with the reservation for today.

Then again they just won't be selling tickets to people who have reservatins, they will be selling tickets to customers without reservations.

My Table Specs Date, Time, First Name, Last Name, Zip Code, Seniors, Adults, Children, Payment, Reservation Date, Time, Rseniors, RAdults, RChildren


The main thing I want to know is how to search for the person's last name with guidelines from date and time. And how the easiest way to do this would be.

PLEASE HELP
 
One way is to use SELECT - SQL to do your job

Code:
SELECT LastName,;
       DateTimeFieldHere,;
       COUNT(*) AS NumberOfResevations;
FROM MyTable;
GROUP BY LastName, DateTimeFieldHere;
WHERE TTOD(DateTimeFieldHere) = DATE();
INTO CURSOR crsTest
BROWSE NORMAL


Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top