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

Generating Multiple Labels from One Record

Status
Not open for further replies.

cgeorge110

Technical User
Mar 9, 2004
2
US
Thank you in advance to anyone who can provide assistance.

To give some background, I'm working on a database to manage golf course reservations for the resort I work at. I am working on creating a report to print vouchers for guests that we have reserved tee-times for to take to the area course that is reserved. We need one voucher for each player.

I have a form called "Golf Master" that contains the main reservation information (ie confirmation #, name the room is reserved under, dates, package, etc...) and a subform called "Golf Course Tee-Times" that contains the golf course reservation information. I created a subform because a resort reservation can have multiple tee-times reserved under it.

I have created a query, based on an individual confirmation number, to pull up all tee-times reserved under the resort reservation. I have also created a report to print from the query onto our pre-printed voucher paper. This has worked fine. However, for billing and tracking purposes, our finance department needs one voucher per player, rather than the one voucher per tee-time as I have it set now.

Currently, on the tee-time subform, I have text boxes for the name of each player and the total number of players. What I'm having a challenge with is creating a report that would print a voucher for each player with his/her name on it based on the number of players for each tee-time reserved. I thought that the only information that will change on the original voucher report I had was the name line since the course, tee-time, and date will remain the same for each player.

Thank you for any assistance you can provide!!

Chris
 
I've been working on an OnPrint module that contains the following:

Function PlayerNumber(R As Report)

plyrs = Me.[Number of Players].Value

If plyrcount < (plyrs - 1) Then
R.NextRecord = False
plyrcount = plyrs + 1
Else
plyrcount = 0
R.NextRecord = True

End If
End Function

I figured that if I could find a way to display the record the number of times that there are players, that it wouldn't be too difficult to add in code to change the players names. However, everytime I open the report, I'm given an error that says that Access can't find the field "Number of Players" that I'm referring to. I'm assuming it's because the report is linked to a query and the OnPrint command will cause the formatting prior to querying that data (please let me know if I'm incorrect). Anyone have any ideas of how I can build off of this? Thank you!!

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top