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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help....again.

Status
Not open for further replies.

allard

Technical User
Jan 3, 2001
11
0
0
NL
I'm starting to get the hang of this Access. But...Im stuck with another program. Ive made a quarie wich show me future reservation (adapting to the current date) so far so good. But now I want to show the dates per client on which he arives. EG. Mike has 3 reservations (future) and I want to show the dates on wich he arrives.

This is what I did: I made a querie in which the reservations (future ones) are shown. Then a # total(whatever you call it..Im Dutch so I dont know what to call it), so the querie gives me the number of future reservation (1,2,3,4, or 5). Then I put arrival date and total "first". Then I put arrival date again, but now with criteria: number>1, and again total "first"Is this the right way to do it?

Thanks. O yeah. If this isnt the forum for newbies....please tell me.
 
I am not sure what your problem is? what is happening that you don't want to.

IS this what you want?
Total number of Future reservations in one column,
The arrival date for the first reservation in the second column,
and the arrival date for the second reservation in the third column.

And yes this is an area for newbies to learn.

Walt III
SAElukewl@netscape.net
 
The querie has this: clientnumber, last name, total numbers of dates, the arrival dates and the departure dates. Ive got 2 tabels. 1. CLients (with clietnnumber,last name and so on.) 2. Reservations(all the reservations ever made>> past and future).
Ive made 2 other queries. One shows me the future reservations and the other one the past reservations. This is where Ive got the dates from. Hope this is enough. O yeah. What about the reservations that are taking place at this moment???? How are they being shown??
 
Reservations that Are for the exact day we could be shown either the way plug some dates in and see what happens.

If you want to list the total number of dates and the actual dates then YOu can either use a subform or you can make a new query that combines all of the information into one query.

If you are cramped for space in your database then a subform is the way to go. However it is a little more work to put together.

Combining the query's will just diplicate all of your data together and will be much easier to work with but will take up more space than a subform would.

Walt III
SAElukewl@netscape.net
 
Ive got enough space.
But I dont know how to make that querie. EG. Mike has reservations for januari,march and august next year. Iknow how to make a querie that shows me that Mike has 3 reservations. But, in the same querie, I want it to show the dates aswell: colum1 clientnumber, colum2 lastname, colum 3 number of reservations, colum 4 date 1, colum 5 date 2 (if there is one), colum 6 date 3 (if there is one), etc... (If a client has just 1 reservation. I diont want it to show off course.)
 
On a form if you want to show a field like the first date and the second date and the third date The only way to do keep them from showing on the form is to hide them if they are null or blank and this requires a bit of coding that can be kind of complicated. If you just want to view this information and then maybe print it and aren't going to change any of the information then You might try bringing up a a report in print preview mode. Then you will show all of the dates and only the dates that are filled in.

Walt III
SAElukewl@netscape.net
 
But I want it to show in a querie. Ill simplify it.I made a tabel; reservations. And a tabel clients. Mike has reservations for 20-01-2002 20-02-2002 and 20-03-2002.
Now I need a Querie that show me this:

name: date 1 date2 date 3

MIKE 20-01-2002 20-02-2002 20-03-2002

And if a put an extra/different reservation for Mike...itll adapt. Just should have to use coding for that??

Thanks
 
But I want it to show in a querie. Ill simplify it.I made a tabel; reservations. And a tabel clients. Mike has reservations for 20-01-2002 20-02-2002 and 20-03-2002.
Now I need a Querie that show me this:

name: date 1 date2 date 3

MIKE 20-01-2002 20-02-2002 20-03-2002

And if a put an extra/different reservation for Mike...itll adapt. Just should have to use coding for that??

Thanks
Otherwise..Cant I just send you the database???
 
If you make this query using a subroutine then You can probably make it adaptive. I don't know how you would code it exactly but something along the lines of if something is not blank then add it to the select statement.

This could be some rather dificult coding to do. I really don't know how to go after it unless you were very knowledgeable in VB and SQL

Walt III
SAElukewl@netscape.net
 
Thats to difficult for me. Cant I just send ya the database so that you can fix it for me??? ;0)

Thanks anyways
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top