How to make Report based on salesman name and products sold by him

C

CAPTGNVR

DEAR ALL
a) Designed one sub report AS "INT_SUB" and final report as "INT_REP".

b) In 'INT_REP" source is from "INT_SUB" and MASTER AND CHILD fields to
"INTRODUCED BY" field.

c) Wiht one list box by name "INTRO_NAMES" got the list of names to be shown.

D) Event procedure for listbox after update asf:

Private Sub INTRO_NAMES_AfterUpdate()
Dim INTRONAME As String
INTRONAME = "INTRODUCED BY = Forms![INTRO_D]!INTRO_NAMES"
DoCmd.OpenReport "INT_REP", acViewPreview, , INTRONAME
End Sub

e) I still get a input box asking for " enter parameter value-- INTRODUCED BY"

Can anyone help me what I am doing wrong. Read extensively and unable to
trace

- in short I need the foll:

1. to take from list of men, a report of members they introduced; to review
or print as I need.

2. to take multi choice of more than three or four men and make a report of
the members introduced by them and print or preview as i need.

3. all information is in one table only.

4. U can give me a link to read up for the above need or an access mdb with
the above requirement so that I can read the VB and try.


Trust me after trying for three days I have decided to seek assistance. Pls
help.

BRGDS/CAPTGNVR
 
E

Evi

If you re-read what you've written you may see how unclear it is because of
all the words which you have missed out.

Has the listbox 2 columns or 1? ie is the value what you see or is there a
hidden first column

Is it multiselect. If yes, you need different code

Introduced by has a space in the middle so *if it is a field in your main
report*, you will need a box around it in your query.

You've not said if Introduced by is a string or a number field so I'll
assume a string (the code is different for numbers).

Dim MyIntro As String

MyIntro = Me.INTRO_NAMES

DoCmd.OpenReport "Your Report",acViewPreview,,"[Introduced By]=""" & MyIntro
& """"

That's 3 quotes after the equals and 4 after the last &

Evi
 
C

CAPTGNVR

D/EVI
Obliged for your response for it has given me a boost to pursue my quest.

Simplest way will be to tell u my need.
Have one table with all the data--containing list of persons who introduced
members and their contact details.

1. Require a form with combo box/list box to select the name of the person
and based on that to get a preview of all the members introduced by that
person and print.

2. a choice to select multiple persons and get the members introduced by
them under different group headings to preview and print.

However, sorry for not making it clear in my post as too much info needs to
be given.

With respect to your clarification needed:

1. List box - has row source type is - table/querry and row source is a
query from the table with all the members data.

2. it is not multiselect

3. I found it that "INTRODUCED BY" not affecting as an access field.

4. I understand 'box around it' like this [introduced by] or (introduced
by)??

5. introduced by is a text field with only names with initials.

I saw the sqr box in ur code and I wl try that and revert.

Finally a big thanks and appreciation for the time u hv taken to help me out.

BRGDS/CAPTGNVR
Evi said:
If you re-read what you've written you may see how unclear it is because of
all the words which you have missed out.

Has the listbox 2 columns or 1? ie is the value what you see or is there a
hidden first column

Is it multiselect. If yes, you need different code

Introduced by has a space in the middle so *if it is a field in your main
report*, you will need a box around it in your query.

You've not said if Introduced by is a string or a number field so I'll
assume a string (the code is different for numbers).

Dim MyIntro As String

MyIntro = Me.INTRO_NAMES

DoCmd.OpenReport "Your Report",acViewPreview,,"[Introduced By]=""" & MyIntro
& """"

That's 3 quotes after the equals and 4 after the last &

Evi




CAPTGNVR said:
DEAR ALL
a) Designed one sub report AS "INT_SUB" and final report as "INT_REP".

b) In 'INT_REP" source is from "INT_SUB" and MASTER AND CHILD fields to
"INTRODUCED BY" field.

c) Wiht one list box by name "INTRO_NAMES" got the list of names to be shown.

D) Event procedure for listbox after update asf:

Private Sub INTRO_NAMES_AfterUpdate()
Dim INTRONAME As String
INTRONAME = "INTRODUCED BY = Forms![INTRO_D]!INTRO_NAMES"
DoCmd.OpenReport "INT_REP", acViewPreview, , INTRONAME
End Sub

e) I still get a input box asking for " enter parameter value-- INTRODUCED BY"

Can anyone help me what I am doing wrong. Read extensively and unable to
trace

- in short I need the foll:

1. to take from list of men, a report of members they introduced; to review
or print as I need.

2. to take multi choice of more than three or four men and make a report of
the members introduced by them and print or preview as i need.

3. all information is in one table only.

4. U can give me a link to read up for the above need or an access mdb with
the above requirement so that I can read the VB and try.


Trust me after trying for three days I have decided to seek assistance. Pls
help.

BRGDS/CAPTGNVR
 
E

Evi

If [Introduced By] is the name of a text field in your report (ie not just a
textbox which you put into the report but a field in the table or query on
which the report is based) then the code I gave you should work so long as
the combo/listbox only has one column. Check this by going to its Row Source
and seeing how many columns the underlying query has.

Of course you will need to replace the word Your Report with the actual name
of your report, but keep the quote marks.


Put the code I sent in the After Update Event of the listbox or combo and
please stop writing in mobile phone texting language - it's driving this old
lady demented :)

Evi


CAPTGNVR said:
D/EVI
Obliged for your response for it has given me a boost to pursue my quest.

Simplest way will be to tell u my need.
Have one table with all the data--containing list of persons who introduced
members and their contact details.

1. Require a form with combo box/list box to select the name of the person
and based on that to get a preview of all the members introduced by that
person and print.

2. a choice to select multiple persons and get the members introduced by
them under different group headings to preview and print.

However, sorry for not making it clear in my post as too much info needs to
be given.

With respect to your clarification needed:

1. List box - has row source type is - table/querry and row source is a
query from the table with all the members data.

2. it is not multiselect

3. I found it that "INTRODUCED BY" not affecting as an access field.

4. I understand 'box around it' like this [introduced by] or (introduced
by)??

5. introduced by is a text field with only names with initials.

I saw the sqr box in ur code and I wl try that and revert.

Finally a big thanks and appreciation for the time u hv taken to help me out.

BRGDS/CAPTGNVR
Evi said:
If you re-read what you've written you may see how unclear it is because of
all the words which you have missed out.

Has the listbox 2 columns or 1? ie is the value what you see or is there a
hidden first column

Is it multiselect. If yes, you need different code

Introduced by has a space in the middle so *if it is a field in your main
report*, you will need a box around it in your query.

You've not said if Introduced by is a string or a number field so I'll
assume a string (the code is different for numbers).

Dim MyIntro As String

MyIntro = Me.INTRO_NAMES

DoCmd.OpenReport "Your Report",acViewPreview,,"[Introduced By]=""" & MyIntro
& """"

That's 3 quotes after the equals and 4 after the last &

Evi




CAPTGNVR said:
DEAR ALL
a) Designed one sub report AS "INT_SUB" and final report as "INT_REP".

b) In 'INT_REP" source is from "INT_SUB" and MASTER AND CHILD fields to
"INTRODUCED BY" field.

c) Wiht one list box by name "INTRO_NAMES" got the list of names to be shown.

D) Event procedure for listbox after update asf:

Private Sub INTRO_NAMES_AfterUpdate()
Dim INTRONAME As String
INTRONAME = "INTRODUCED BY = Forms![INTRO_D]!INTRO_NAMES"
DoCmd.OpenReport "INT_REP", acViewPreview, , INTRONAME
End Sub

e) I still get a input box asking for " enter parameter value--
INTRODUCED
BY"
Can anyone help me what I am doing wrong. Read extensively and unable to
trace

- in short I need the foll:

1. to take from list of men, a report of members they introduced; to review
or print as I need.

2. to take multi choice of more than three or four men and make a
report
of
the members introduced by them and print or preview as i need.

3. all information is in one table only.

4. U can give me a link to read up for the above need or an access
mdb
with
the above requirement so that I can read the VB and try.


Trust me after trying for three days I have decided to seek
assistance.
Pls
help.

BRGDS/CAPTGNVR
 
C

CAPTGNVR

D/EVI

Before i go any further-- BINGO- your code worked. I decided to redo with
your code and all fine. Having said that -- only the first part is over.

Second phase is -- What if the list box is made multi select; three
introducers are selected and the report to show each of the introducer name
and the members they introduced. I have tried with for..next etc. So please
suggest what modification is required in this following code.

Private Sub INTRO_NAMES_AfterUpdate()
Dim INTRONAME As String
Dim MyIntro As String
INTRONAME = "INTRODUCED BY = Forms![INTRO_D]!INTRO_NAMES"
MyIntro = Me.INTRO_NAMES

DoCmd.OpenReport "INTRO", acViewPreview, , "[INTRODUCED BY]=""" & MyIntro &
""""
DoCmd.Maximize


End Sub

So I request you to explain

1) What change in above code needed to use the list box as multi select; vb
code to take say three introducers and get the print report segregated by the
introducers.

2) I get to maximise the screen of the report but unable to zoom. Checked
docmd but does not have zoom function. What to do to maximize and also zoom
it to 100pct.

3) Short explanation of "[INTRODUCED BY]=""" & MyIntro & """"
understand 50 percent of it like introudced by to be in quotes, before and
after ampersand one quote and so on. But pleas do explain if you dont mind.

4) Finally an user-form where I will have introuducer listbox, pincode
listbox, alive or dead option, mail delivered or undelivered option; all this
information if i assign it to unbound text box and refer this text box in the
query will it work or it is better to do it in vb?? If VB then how to take
two options and incorporate like introduced members and mail delivered?

I apologise for using the mobile text and ensured that I did not do now.

Please help me with this and I will be highly obliged. After your first
help - looking forward to very eagerly.

Once again thanks for yesterdays help and appreciate it a lot.
with best regards/captgnvr



Evi said:
If [Introduced By] is the name of a text field in your report (ie not just a
textbox which you put into the report but a field in the table or query on
which the report is based) then the code I gave you should work so long as
the combo/listbox only has one column. Check this by going to its Row Source
and seeing how many columns the underlying query has.

Of course you will need to replace the word Your Report with the actual name
of your report, but keep the quote marks.


Put the code I sent in the After Update Event of the listbox or combo and
please stop writing in mobile phone texting language - it's driving this old
lady demented :)

Evi


CAPTGNVR said:
D/EVI
Obliged for your response for it has given me a boost to pursue my quest.

Simplest way will be to tell u my need.
Have one table with all the data--containing list of persons who introduced
members and their contact details.

1. Require a form with combo box/list box to select the name of the person
and based on that to get a preview of all the members introduced by that
person and print.

2. a choice to select multiple persons and get the members introduced by
them under different group headings to preview and print.

However, sorry for not making it clear in my post as too much info needs to
be given.

With respect to your clarification needed:

1. List box - has row source type is - table/querry and row source is a
query from the table with all the members data.

2. it is not multiselect

3. I found it that "INTRODUCED BY" not affecting as an access field.

4. I understand 'box around it' like this [introduced by] or (introduced
by)??

5. introduced by is a text field with only names with initials.

I saw the sqr box in ur code and I wl try that and revert.

Finally a big thanks and appreciation for the time u hv taken to help me out.

BRGDS/CAPTGNVR
Evi said:
If you re-read what you've written you may see how unclear it is because of
all the words which you have missed out.

Has the listbox 2 columns or 1? ie is the value what you see or is there a
hidden first column

Is it multiselect. If yes, you need different code

Introduced by has a space in the middle so *if it is a field in your main
report*, you will need a box around it in your query.

You've not said if Introduced by is a string or a number field so I'll
assume a string (the code is different for numbers).

Dim MyIntro As String

MyIntro = Me.INTRO_NAMES

DoCmd.OpenReport "Your Report",acViewPreview,,"[Introduced By]=""" & MyIntro
& """"

That's 3 quotes after the equals and 4 after the last &

Evi




DEAR ALL
a) Designed one sub report AS "INT_SUB" and final report as "INT_REP".

b) In 'INT_REP" source is from "INT_SUB" and MASTER AND CHILD fields to
"INTRODUCED BY" field.

c) Wiht one list box by name "INTRO_NAMES" got the list of names to be
shown.

D) Event procedure for listbox after update asf:

Private Sub INTRO_NAMES_AfterUpdate()
Dim INTRONAME As String
INTRONAME = "INTRODUCED BY = Forms![INTRO_D]!INTRO_NAMES"
DoCmd.OpenReport "INT_REP", acViewPreview, , INTRONAME
End Sub

e) I still get a input box asking for " enter parameter value-- INTRODUCED
BY"

Can anyone help me what I am doing wrong. Read extensively and unable to
trace

- in short I need the foll:

1. to take from list of men, a report of members they introduced; to
review
or print as I need.

2. to take multi choice of more than three or four men and make a report
of
the members introduced by them and print or preview as i need.

3. all information is in one table only.

4. U can give me a link to read up for the above need or an access mdb
with
the above requirement so that I can read the VB and try.


Trust me after trying for three days I have decided to seek assistance.
Pls
help.

BRGDS/CAPTGNVR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top