Hello, I have searched all over and did not see any threads on this.
I have 1 table called tbl_Inventory with fields: Address(text), Type(text), Customer (text), Select (yes/no)
I have a main form with combo box where user can select customer and the subform will display a list of addresses for that selected customer. Subform displays all fields in continuous format. Select field is a column with check boxes that user can select addresses they want to print. The field Type has one of 3 value: SFR, Condo, and Multi. So the subform looks something like this.
123 Lincoln SFR John Doe (checkbox)
321 Broadway Condo John Doe (checkbox)
.
.
etc.
3 reports: SFR, Condo, and Multi
Now I want one command button to print all selected addresses with corresponding reports based on Type field.
for example, if selected record is a SFR, then print SFR report for that record
if selected record is a Condo, then print Condo report, etc.
The code below print out all selected records on same report type.
Please help!
[FONT="]Select Case Me![Type][/FONT]
[FONT="] [/FONT]
[FONT="] Case "SFR"[/FONT]
[FONT="] strDocName = "SFR"[/FONT]
[FONT="] [/FONT]
[FONT="] Case "CONDO"[/FONT]
[FONT="] strDocName = "CONDO"[/FONT]
[FONT="] [/FONT]
[FONT="] Case "MULTI"[/FONT]
[FONT="] strDocName = "MULTI"[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]End Select[/FONT]
[FONT="] [/FONT]
[FONT="]DoCmd.OpenReport strDocName, acViewNormal, , "Select = yes", acWindowNormal[/FONT]
I have 1 table called tbl_Inventory with fields: Address(text), Type(text), Customer (text), Select (yes/no)
I have a main form with combo box where user can select customer and the subform will display a list of addresses for that selected customer. Subform displays all fields in continuous format. Select field is a column with check boxes that user can select addresses they want to print. The field Type has one of 3 value: SFR, Condo, and Multi. So the subform looks something like this.
123 Lincoln SFR John Doe (checkbox)
321 Broadway Condo John Doe (checkbox)
.
.
etc.
3 reports: SFR, Condo, and Multi
Now I want one command button to print all selected addresses with corresponding reports based on Type field.
for example, if selected record is a SFR, then print SFR report for that record
if selected record is a Condo, then print Condo report, etc.
The code below print out all selected records on same report type.
Please help!
[FONT="]Select Case Me![Type][/FONT]
[FONT="] [/FONT]
[FONT="] Case "SFR"[/FONT]
[FONT="] strDocName = "SFR"[/FONT]
[FONT="] [/FONT]
[FONT="] Case "CONDO"[/FONT]
[FONT="] strDocName = "CONDO"[/FONT]
[FONT="] [/FONT]
[FONT="] Case "MULTI"[/FONT]
[FONT="] strDocName = "MULTI"[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="]End Select[/FONT]
[FONT="] [/FONT]
[FONT="]DoCmd.OpenReport strDocName, acViewNormal, , "Select = yes", acWindowNormal[/FONT]