display record of specific customer

pushkar1986

Registered User.
Local time
Tomorrow, 00:38
Joined
Aug 24, 2009
Messages
14
I have created a list button having names of the customers.i want to display only those records in which items are sold on credit.I also want to get total at the end of the report.in the table i have created a field name "balance".

waiting for the reply.thank you
 
I have created a list button having names of the customers.i want to display only those records in which items are sold on credit.I also want to get total at the end of the report.in the table i have created a field name "balance".

waiting for the reply.thank you

use the report wizard to create your report and select the relevant fields. after it's created open the recordsource of the report in design view and in your (presumably) "itemsSold" yes/no or string column, just put "yes" or -1 in the condition as the criteria.

for count, create a textbox at the footer of the report and inside it type:
=Count(*)
 
use the report wizard to create your report and select the relevant fields. after it's created open the recordsource of the report in design view and in your (presumably) "itemsSold" yes/no or string column, just put "yes" or -1 in the condition as the criteria.

for count, create a textbox at the footer of the report and inside it type:
=Count(*)


I think u didn't got it right...i want to display the records of specified customer selected in the list box & only those records in which items are sold on credit.I want to get total amount receivable at the end of report.
 
there are a couple of ways. first of all build your query that will show all customers in which items are sold. create your report and set its Record Source property to that query. i am assuming you have a button on your form to call the report. if the listbox is called "listbox1" do the following on the On Click event of the button:

Code:
If Listbox1.ListIndex > -1 And Listbox1.value <> "" Then
        DoCmd.OpenReport ReportName, , "[CustomerID] = " & Nz(Listbox1.Column(0), "") & ""
    Else
        MsgBox "Select a customer from the list"
    End If

for this to work, your list box must be a multi column list box, with your first column to be the CustomerID and the second column being the Customer's Name. replace ReportName with the name of your report in quotes.
 

Users who are viewing this thread

Back
Top Bottom