add variable from outside table

D

Dan @BCBS

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
M

Mr B

Dan,

When you need information in a report that is not directly related to the
data that is used in the report you have a couple of choices.

One option is to pass the information you need to the report using the
OpenArgs property of the OpenReport command. Check out the OpenArgs value
that you can use when opening a reprot, form, etc.

Another option is to use code in the Report to read the data from your form
or subform and have it inserted into the rerpot.
 
D

Dan @BCBS

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you
 
M

Mr B

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





Dan @BCBS said:
The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
D

Dan @BCBS

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







Mr B said:
Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





Dan @BCBS said:
The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
M

Mr B

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







Mr B said:
Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
D

Dan @BCBS

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















Mr B said:
Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







Mr B said:
Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
M

Mr B

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















Mr B said:
Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
D

Dan @BCBS

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

Mr B said:
Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















Mr B said:
Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
M

Mr B

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

Mr B said:
Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
D

Dan @BCBS

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


Mr B said:
Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

Mr B said:
Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
M

Mr B

Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


Mr B said:
Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.

I've been rebuilding queries and trying to force a relationship - but I'm
stuck - any suggestions????

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
D

Dan @BCBS

They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



Mr B said:
Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


Mr B said:
Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
doctors signatures (OLE objects).

I've added a drop down created from the doctor signature table (to the above
mentioned form).

The user needs to pick a doctor from the drop down and his signature will be
added to the letter.

The problem is that the table with the doctors signatures does not have any
relationship to the previous tables. The user just picks the doctor from the
drop down.
 
M

Mr B

Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



Mr B said:
Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
name of your combo box.

If your combo box has the Record Id for each doctor as the first column and
the actual name of the Doctor as the second column, then you would use
something like:

Forms!Form5!cboDoctors.column(1)

This would cause your text box to display the value of the second column
because the columns are counted using a zeor based count.

If you want to actually use VBA code the you can place code like the
following in the OnFormat event of the section of your report in which you
have the doctor's name:

If your combo only has the names of the doctors then use:
Me.txtDrName = Forms!Form5!cboDoctors

but is it has the record Id and the doctors name in two columns then use:
Me.txtDrName = Forms!Form5!cboDoctors.Column(1)

--
HTH

Mr B
askdoctoraccess dot com


:

Could you please help me with your second option?

Currently my "on open" event for the report is just to hide a form.

How would I say:
ADD: f_LetterMenu.Signature
TO: rptThankYou.oleSignature


Private Sub Report_Open(Cancel As Integer)

Forms!f_Lettermenu.Visible = False

Exit_Report_Close:
Exit Sub


Thank you





:

The following code opens a letter (report) for the user to mail out to a
hospital.
The code is from the control button on a form, the form has a subform, and
the user picks from the subform then clicks the button. (code works fine)

Here is my question: I need to add signatures! I have another table with
 
D

Dan @BCBS

Everything you wrote makes sense to me except one thing.

"tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor.

Corrently the tblSignature has the following fields:
RACF, Name, Signature, Title, Department.
The signature is the field with the image.

What do you mean "add a field for the complete path" ??


Thanks





Mr B said:
Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



Mr B said:
Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


:

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help







:

Dan,

Sorry it took a while to get back to you. I have been covered up.

You have a couple of choices for getting the Doctor's name to appear in your
report.

If your combo box is just listing the names of the doctors, you can simply
open the reprot in design view and set the "control source" for the text box
where you want the doctor's name to appear to something like:

=Forms!Form5!cboDoctors

Just change the "Form5" to the name of your form and the "cboDoctors" to the
 
M

Mr B

The "ImagePath" field would be a text type field that would have the actual
path to the signature graphic file like:

D:\SomeFolder\SubFolder\FileName.ext

By saving this path for each doctor's signature, your code in your report
can find the graphic that needs to be displayed in the Image control in your
report.

You do not need an ole type field.
--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Everything you wrote makes sense to me except one thing.

"tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor.

Corrently the tblSignature has the following fields:
RACF, Name, Signature, Title, Department.
The signature is the field with the image.

What do you mean "add a field for the complete path" ??


Thanks





Mr B said:
Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



:

Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


:

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:

I plugged in your first suggestion: =Forms!Form5!cboDoctors - which actually
converts to =[Forms]![f_LetterMenu]!cboSignatures

The results on the report are "# ERROR"

Is this because my Combo Box of Doctors has a row source and not a control
source? The row source points to the table SELECT * FROM tblSignatures WHERE
racf in ('uym3','ha00','ha87');

The reason I cannot make the Combo Box have a control source is because the
query which the form is made from does not have the table with the signatures
(tblSignatures) and I cannot add that table to the query.

Or is it another reason that it's returning # ERROR???


Thanks for the help
 
D

Dan @BCBS

The good news is I don't get any errors. The bad news is there is nothing
being returned!!!

1. I added a field called ImagePath. It is a Text field
My tables are SQL tables linked to Access via ODBC.

2. My combo box shows the doctors name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name],
[tblSignatures].[ImagePath] FROM tblSignatures;
BUT-I had to manually add [ImagePath] using the wizard to make the combo
box, ImagePath was not in the list to move over.

3. With the above row source in place I added the properties you suggested.
Only the doctors names appear in the combo box.

4. In the report, I added a new Image, which requires me to pick a picture
from my files. So I picked one of the signatures.

Then I places the following code into the report:

Private Sub Report_Open(Cancel As Integer)
Dim strSgnturPath As String

strSgnturPath = Forms!F_LetterMenu.cboSignature.Column(2)

Me.imgSignature.Picture = strSgnturPath

Forms!F_LetterMenu.Visible = False

Exit_Report_Close:........................

MY RESULTS ARE: report comes up but no signature??


Mr B said:
The "ImagePath" field would be a text type field that would have the actual
path to the signature graphic file like:

D:\SomeFolder\SubFolder\FileName.ext

By saving this path for each doctor's signature, your code in your report
can find the graphic that needs to be displayed in the Image control in your
report.

You do not need an ole type field.
--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Everything you wrote makes sense to me except one thing.

"tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor.

Corrently the tblSignature has the following fields:
RACF, Name, Signature, Title, Department.
The signature is the field with the image.

What do you mean "add a field for the complete path" ??


Thanks





Mr B said:
Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


:

They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



:

Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


:

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















:

Dan,

When I referred to the "Control Source" I was refering to the source for
your text box on your report.

I would expect that your combo box would have a record source. However, the
way you have your row source built, it will return all fields in the in the
tblSignatures table. That is not a bad thing, just not somthing that I would
do. I would have the record source for the combo box to only return the
value(s) that I need for the purpose that I am using the combo box. In other
words, if all you need is the Doctor's namd then you can create the row
source that will only return that field. You would still use the same
criteria but only return one field.

I assume that you had your form (f_LetterMenu) open and that you had a
selection made from the cboSignatures combo box when you opened the report.
If this is true, then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source should have
returned the value selected in the combo box.

With all of the fields being returned to the combo box, you may not have
your combo box setup correctly to return the correct value. How many fields
are in your table? Which column is specified as the Bound column? How many
columns are you setting the combo box to show? If you are showing multiple
columns, what are the values for the column widths?

--
HTH

Mr B
askdoctoraccess dot com


:
 
M

Mr B

Dan,

The new ImagePath field in your table should have been available. The fact
that you had to "manually add" the field in you sql statement is the problem.
That field must be available. You might try refreshing your ODBC
connection.

Did you add the actual path to the signature graphic for each doctors record
in your table?
--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
The good news is I don't get any errors. The bad news is there is nothing
being returned!!!

1. I added a field called ImagePath. It is a Text field
My tables are SQL tables linked to Access via ODBC.

2. My combo box shows the doctors name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name],
[tblSignatures].[ImagePath] FROM tblSignatures;
BUT-I had to manually add [ImagePath] using the wizard to make the combo
box, ImagePath was not in the list to move over.

3. With the above row source in place I added the properties you suggested.
Only the doctors names appear in the combo box.

4. In the report, I added a new Image, which requires me to pick a picture
from my files. So I picked one of the signatures.

Then I places the following code into the report:

Private Sub Report_Open(Cancel As Integer)
Dim strSgnturPath As String

strSgnturPath = Forms!F_LetterMenu.cboSignature.Column(2)

Me.imgSignature.Picture = strSgnturPath

Forms!F_LetterMenu.Visible = False

Exit_Report_Close:........................

MY RESULTS ARE: report comes up but no signature??


Mr B said:
The "ImagePath" field would be a text type field that would have the actual
path to the signature graphic file like:

D:\SomeFolder\SubFolder\FileName.ext

By saving this path for each doctor's signature, your code in your report
can find the graphic that needs to be displayed in the Image control in your
report.

You do not need an ole type field.
--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Everything you wrote makes sense to me except one thing.

"tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor.

Corrently the tblSignature has the following fields:
RACF, Name, Signature, Title, Department.
The signature is the field with the image.

What do you mean "add a field for the complete path" ??


Thanks





:

Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


:

They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



:

Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


:

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

















"Mr B" wrote:
 
D

Dan @BCBS

Finally
I got it - the signatures were just shifted over too far and not visable...

Thank you for all your help...



Mr B said:
Dan,

The new ImagePath field in your table should have been available. The fact
that you had to "manually add" the field in you sql statement is the problem.
That field must be available. You might try refreshing your ODBC
connection.

Did you add the actual path to the signature graphic for each doctors record
in your table?
--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
The good news is I don't get any errors. The bad news is there is nothing
being returned!!!

1. I added a field called ImagePath. It is a Text field
My tables are SQL tables linked to Access via ODBC.

2. My combo box shows the doctors name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name],
[tblSignatures].[ImagePath] FROM tblSignatures;
BUT-I had to manually add [ImagePath] using the wizard to make the combo
box, ImagePath was not in the list to move over.

3. With the above row source in place I added the properties you suggested.
Only the doctors names appear in the combo box.

4. In the report, I added a new Image, which requires me to pick a picture
from my files. So I picked one of the signatures.

Then I places the following code into the report:

Private Sub Report_Open(Cancel As Integer)
Dim strSgnturPath As String

strSgnturPath = Forms!F_LetterMenu.cboSignature.Column(2)

Me.imgSignature.Picture = strSgnturPath

Forms!F_LetterMenu.Visible = False

Exit_Report_Close:........................

MY RESULTS ARE: report comes up but no signature??


Mr B said:
The "ImagePath" field would be a text type field that would have the actual
path to the signature graphic file like:

D:\SomeFolder\SubFolder\FileName.ext

By saving this path for each doctor's signature, your code in your report
can find the graphic that needs to be displayed in the Image control in your
report.

You do not need an ole type field.
--
HTH

Mr B
askdoctoraccess dot com


:

Everything you wrote makes sense to me except one thing.

"tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor.

Corrently the tblSignature has the following fields:
RACF, Name, Signature, Title, Department.
The signature is the field with the image.

What do you mean "add a field for the complete path" ??


Thanks





:

Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


:

They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



:

Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


:

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???

Is it possible to just add the combo box choice "cboSignature" to this code
below??

stDocName = "rptThankYou"

stLinkCriteria = "[ICNNo]='" & Me![ICNNo] & _
"' AND [ProvNo] = '" & Me!f_ProvSub!ProvNo & "'"

DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
 
M

Mr B

Your quite welcome. Glad you got it going.

--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
Finally
I got it - the signatures were just shifted over too far and not visable...

Thank you for all your help...



Mr B said:
Dan,

The new ImagePath field in your table should have been available. The fact
that you had to "manually add" the field in you sql statement is the problem.
That field must be available. You might try refreshing your ODBC
connection.

Did you add the actual path to the signature graphic for each doctors record
in your table?
--
HTH

Mr B
askdoctoraccess dot com


Dan @BCBS said:
The good news is I don't get any errors. The bad news is there is nothing
being returned!!!

1. I added a field called ImagePath. It is a Text field
My tables are SQL tables linked to Access via ODBC.

2. My combo box shows the doctors name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name],
[tblSignatures].[ImagePath] FROM tblSignatures;
BUT-I had to manually add [ImagePath] using the wizard to make the combo
box, ImagePath was not in the list to move over.

3. With the above row source in place I added the properties you suggested.
Only the doctors names appear in the combo box.

4. In the report, I added a new Image, which requires me to pick a picture
from my files. So I picked one of the signatures.

Then I places the following code into the report:

Private Sub Report_Open(Cancel As Integer)
Dim strSgnturPath As String

strSgnturPath = Forms!F_LetterMenu.cboSignature.Column(2)

Me.imgSignature.Picture = strSgnturPath

Forms!F_LetterMenu.Visible = False

Exit_Report_Close:........................

MY RESULTS ARE: report comes up but no signature??


:

The "ImagePath" field would be a text type field that would have the actual
path to the signature graphic file like:

D:\SomeFolder\SubFolder\FileName.ext

By saving this path for each doctor's signature, your code in your report
can find the graphic that needs to be displayed in the Image control in your
report.

You do not need an ole type field.
--
HTH

Mr B
askdoctoraccess dot com


:

Everything you wrote makes sense to me except one thing.

"tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor.

Corrently the tblSignature has the following fields:
RACF, Name, Signature, Title, Department.
The signature is the field with the image.

What do you mean "add a field for the complete path" ??


Thanks





:

Dan,

Now I think that I understand what you are trying to do.

Here is my suggestion.

First, I would not use an OLD control in the report, but use an Image control.

Next, in your "tblSignatures" add a field for the complete "Path" to where
each of the bitmap images is stored. Then save the path to each Doctor's
signature in the record for each doctor. If is not clear to me if in fact you
have the doctor's actual name as a field in your table, but if not, I would
suggest that you include a field for the doctor's name. You will not need
your Signature field which I have come to believe is an ole type field.

Next, have your combo box to show each doctor's name but have the first
column be the RACF field. You can have all requied info to be held in the
combo box if you would like.

Your sql statement would include the RACF, DoctorName, and the ImagePath
fields. (Your actual field names can be what ever you want but I have just
used some names for describing what I am suggesting.

Once you have your row source for your combo box providing the RACF,
DoctorName, and the ImagePath fields, you will need to set the following
properties for your combo box.
Set the Column Count to 3
Set the Column Widths to: 0";1.2";0 (the 1.2 value can be the same as the
Width property of the combo box. The first and last zeros hide the "RACF"
field and the "ImagePaths" from being seen when the combo box is dropped
down.)

When you try you combo box, you should now only see the list of Doctor's
names. You will not see the RACF field or the ImagePath fields in the combo
box, however there values are available from the combo box through code.

Now, in your report, place an Image control. (you should rename this control
to something like "imgSigature" just for referencing purposes.

Next, in the section of your report where the Image control is located,
place the following code:

Dim strSgnturPath As String

strSgnturPath = Forms!FromName.ComboboxName.Column(2)

Me.imgSigature.Picture = strSgnturPath

Now with a doctor selected in your combo box, preview your report. You
should see the graphic of the signature specified in the ImagePath field in
your table.

--
HTH

Mr B
askdoctoraccess dot com


:

They are bitmap images of the hand written signatures.

Is there any hope to adding this OLE through the report or do I need to go
back to adding the combo box choice to the command button that opens the
report?

Thanks



:

Well, I just did not pickup on the fact that on of your fields is an ole
object.

The concept that we have been discussing will not work for old objects.

Are the signatures that you want to display actually in some graphic format?

--
HTH

Mr B
askdoctoraccess dot com


:

My appoligies - I've been working to resolve this and tried both:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;
SELECT * FROM tblSignatures WHERE racf in ('uym3','ha00','ha87');

Yes, my form is open, I use the command button to open the report!

In regards to the row source above, RACF is the unique field for each
doctor, Name is the field that displays in the combo box.

Then on the report I'm trying to display the "signature" which is an OLE
object.
With this Select statement in the text box on the report, I would expect to
see the Name vlaue but this is what displays: #Name:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

Again - the goal is to get the signature value to display in the report text
box!

Suggestions?


:

Ok, Dan.

Let's see if we can resolve this.

In your previous post you said that the Row source for your combo box was:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

IF this is true then only two fields are being returned in the combo box.
The select statement determines the fields that are available to the combo
box not the table.

I have been assuming that your form is open when you preview your report.
Is this true?

--
HTH

Mr B
askdoctoraccess dot com


:

I really appreciate your assistance - this Doctors signature is the final
step before I roll this db to production.

Anyway:
The value needed (signature) for the report is the 3rd column in the table.

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures
Results = "# ERROR"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(1)
Results = "# NAME"

When the report text box has: =[Forms]![f_LetterMenu]!cboSignatures.column(3)
Results = "# NAME"

Suggestions?

:

Dan,

The control source you have for your text box will return the value that is
the "Bound column" of your combo box.

You row source is returning two columns of data: RACF and Name. If you have
the Bound Column of your combo box set to 1 then the value that should be
shown in your text box when you preview the report would be the value in the
RACF field. If you wan the Name field then use:

"=[Forms]![f_LetterMenu]!cboSignatures.column(1)"

Are you seeing any value at all in text box in your report or are you still
getting the Error?

--
HTH

Mr B
askdoctoraccess dot com


:

Yes, to your statement: "then the text box that has the
"=[Forms]![f_LetterMenu]!cboSignatures" as its control source...."

That leads me to your next comments refering to the combo box.

This is the Row Source to my combo box:
SELECT [tblSignatures].[RACF], [tblSignatures].[Name] FROM tblSignatures;

And as you suggested, this is the Control Source to my text box on the report:
=[Forms]![f_LetterMenu]!cboSignatures

"BUT" I noticed something - the signature field in the table that I want to
place in the report (called: signature) is not part of the text box Control
Source or anything!!

Correct me if I'm wrong but - should my command button on the form read in
the choice the user makes.. Then the report text box should be the actual
variable I want to see called "signature"???
 

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

Similar Threads

Command Button linked to SubForm 5
Add signature to report 3
Open based on two values 4
Type Mismatch 3
Write to table then read data 1
Sub Form Updating 3
Write Conflict 6
ADD Mode 4

Top