hi...
firstly, i created some report based on query. then in my form i create list and combox to list down all primary key that had in query..
what i want to do is open report, based on criteria that i selected from combobox or list box...
i create both cbo and list box to compare which 1 is better... but both not working. i mean it works but not show the data as i want to. it open / list all data at report..
i use this code but nothing happen :
for listbox;
and Cbo;
plz help me..i dunno what to do..
it works but not correct
firstly, i created some report based on query. then in my form i create list and combox to list down all primary key that had in query..
what i want to do is open report, based on criteria that i selected from combobox or list box...
i create both cbo and list box to compare which 1 is better... but both not working. i mean it works but not show the data as i want to. it open / list all data at report..
i use this code but nothing happen :
for listbox;
StCriteria = "[ID]=" & "'" & ListCustomer.Column(0) & "'"
DoCmd.OpenReport "Invoice Print", acPreview, , StrCriteria
and Cbo;
StrCriteria = "[ID]=" & Me.[cboCustomer]
DoCmd.OpenReport "Invoice Print", acPreview, , StrCriteria
plz help me..i dunno what to do..
it works but not correct