B
Bayou BoB
Hi Everyone.
I'm still working on building the forms that house all of the reports
that we print in a day, week, month, year. To this point I've been
using the easier way out, and opting for several buttons, when a combo
button could do the job just as nicely. As it stands, I have 4
buttons, and likely only need 1, as well as a pair of combo boxes.
I need to be able to choose either a detailed report, or a summary
report....as well as choosing for either a single client or all of the
database clients. Here is the code I've been using, and I've just put
it on two different buttons to load 2 different reports, one a
summary, one a detailed report. Buttons three and four are the same as
below without the stWhere statement. I'd lke 2 option boxes...each
with two options. One that has "all clients" and "single
client".....and another that has "detailed" and "summary". What's the
best way to do this and how would I code the Print button's onclick
property? Thanks.
Kevin
Private Sub Command33_Click()
On Error GoTo Err_Command33_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "CLI_DetailedAttendance_Rep"
stWhere = "ClientID=" & Me!ClientID & " AND " & stWhere
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_Command33_Click:
Exit Sub
Err_Command33_Click:
MsgBox Err.Description
Resume Exit_Command33_Click
I'm still working on building the forms that house all of the reports
that we print in a day, week, month, year. To this point I've been
using the easier way out, and opting for several buttons, when a combo
button could do the job just as nicely. As it stands, I have 4
buttons, and likely only need 1, as well as a pair of combo boxes.
I need to be able to choose either a detailed report, or a summary
report....as well as choosing for either a single client or all of the
database clients. Here is the code I've been using, and I've just put
it on two different buttons to load 2 different reports, one a
summary, one a detailed report. Buttons three and four are the same as
below without the stWhere statement. I'd lke 2 option boxes...each
with two options. One that has "all clients" and "single
client".....and another that has "detailed" and "summary". What's the
best way to do this and how would I code the Print button's onclick
property? Thanks.
Kevin
Private Sub Command33_Click()
On Error GoTo Err_Command33_Click
Dim stDocName As String
Dim stWhere As String
stDocName = "CLI_DetailedAttendance_Rep"
stWhere = "ClientID=" & Me!ClientID & " AND " & stWhere
DoCmd.OpenReport stDocName, acPreview, , stWhere
Exit_Command33_Click:
Exit Sub
Err_Command33_Click:
MsgBox Err.Description
Resume Exit_Command33_Click