hi,
I am trying to add a couple of columns in to this code.
The code was working fine with "lstbox4 and "lstbox5 but when I added the columns I got an "Undefined function" message box, does anyone know why.
Case 2
If Trim(Forms!frmreportandupdates!lstbox4 & lstbox5 & lstbox5.Column(2) & lstbox5.Column(3) & "") <> "" Then
DoCmd.OpenReport "rptgroupcode", acViewPreview, "", "[contact]=[Forms]![frmreportandupdates]![lstbox4] And [location]=[Forms]![frmreportandupdates]![lstbox5] and [grp_code]=[Forms]![frmreportandupdates]![lstbox5].column(2) and [Pay_Pt]=[Forms]![frmreportandupdates]![lstbox5].column(3)
I am trying to add a couple of columns in to this code.
The code was working fine with "lstbox4 and "lstbox5 but when I added the columns I got an "Undefined function" message box, does anyone know why.
Case 2
If Trim(Forms!frmreportandupdates!lstbox4 & lstbox5 & lstbox5.Column(2) & lstbox5.Column(3) & "") <> "" Then
DoCmd.OpenReport "rptgroupcode", acViewPreview, "", "[contact]=[Forms]![frmreportandupdates]![lstbox4] And [location]=[Forms]![frmreportandupdates]![lstbox5] and [grp_code]=[Forms]![frmreportandupdates]![lstbox5].column(2) and [Pay_Pt]=[Forms]![frmreportandupdates]![lstbox5].column(3)