Field contents as variable

  • Thread starter Thread starter AlwaysLearning
  • Start date Start date
A

AlwaysLearning

I have a field that contains the name of another field that has the Visible
property set to NO. I want to set the Visible property of the contents to
YES. Below is a basic sample of what I need.

Field1 = "Field2"
I need to have the equivalent of Field2.visible = true.

Thank you in advance for your help.
 
This is a "how" question. "Why?" What will having this capability allow
you to do?

I'm not asking out of idle curiosity, but because there may be other ways to
get done what you are trying to get done.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I have several letters which I "sign" with the appropriate persons signature
by setting the image visible property to YES. Everytime staff changes I need
to go into each of the letters and change the Select Case statement to
include the new name. Each of the letters have the same exact field names
and logic.

I have created a global function which returns the name of the image I need
to set the visible property to True. The name is in a field.
 
It all starts with the data ... and it sound like there's a chance you use a
different field in your table for each signature. If so, that's very much
like you'd have to do it in a spreadsheet, but not in a relational database.

Please describe the table structure with the data that feeds this
?report/?form.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
The query returns the name of the party signing the letter. I match the name
to the name in the Select Case. The following code is in the Detail Section
On Format event of each of the letters:
Select Case SignatureMgr
Case "Mickey Mouse"
MickeySig.Visible = True
Case "Minnie Mouse"
MinnieSig.Visible = True
Case "Donald Duck"
DonaldSig.Visible = True
End Select

The code I am trying to make work is a common function:
Public Function SigPic(xSigName)
Select Case xSigName
Case "Mickey Mouse"
SigPic = "MickeySig"
Case "Minnie Mouse"
SigPic = "MinnieSig"
Case "Donald Duck"
SigPic = "DonaldSig"
End Select
End Function

When this comes back to the calling code I then want to make the statement
MickeySig.Visible = True but pick up the field from SigPic
 
You've described the code/query you are using.

I asked about the underlying data structure. "How" depends on "what".

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
The query supplying the data to this report has:
CaseNumber
Address
City
State
Zip
SignatureMgr
Mgrphone
Mgremail

Each record returned by the query can have a different name in the
SignatureMgr field.
 
Thanks for the clarification.

So, let's see if I can paraphrase your setup...

You have a report that has multiple signature controls, each with someone
else's signature in it. You only want the correct signature to show.

Doesn't this design mean that you'll have to change the signature controls
on your report every time a [SignatureManager] changes? That sounds like a
maintenance nightmare!

What about the idea of having a SINGLE control that displays a signature
block, and having that signature block itself returned by the query, rather
than the name of the Signature Manager? With a design like this, if your
organization adds a new Signature Manager (or fires one), you don't have to
change anything except making the change in your tblSignatureManager table.

Or am I still not grasping your situation?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
It is a nightmare now! But you now know the problem. How do I return a
signature block in a query and place it into a report? Each signature is in
the form of a .JPG.

Jeff Boyce said:
Thanks for the clarification.

So, let's see if I can paraphrase your setup...

You have a report that has multiple signature controls, each with someone
else's signature in it. You only want the correct signature to show.

Doesn't this design mean that you'll have to change the signature controls
on your report every time a [SignatureManager] changes? That sounds like a
maintenance nightmare!

What about the idea of having a SINGLE control that displays a signature
block, and having that signature block itself returned by the query, rather
than the name of the Signature Manager? With a design like this, if your
organization adds a new Signature Manager (or fires one), you don't have to
change anything except making the change in your tblSignatureManager table.

Or am I still not grasping your situation?

Regards

Jeff Boyce
Microsoft Office/Access MVP


AlwaysLearning said:
The query supplying the data to this report has:
CaseNumber
Address
City
State
Zip
SignatureMgr
Mgrphone
Mgremail

Each record returned by the query can have a different name in the
SignatureMgr field.
 
It is a maintenance nightmare! But you now understand what I need. However,
how do I place the signature into a table and how do I insert it into the
report(letter)?

Jeff Boyce said:
Thanks for the clarification.

So, let's see if I can paraphrase your setup...

You have a report that has multiple signature controls, each with someone
else's signature in it. You only want the correct signature to show.

Doesn't this design mean that you'll have to change the signature controls
on your report every time a [SignatureManager] changes? That sounds like a
maintenance nightmare!

What about the idea of having a SINGLE control that displays a signature
block, and having that signature block itself returned by the query, rather
than the name of the Signature Manager? With a design like this, if your
organization adds a new Signature Manager (or fires one), you don't have to
change anything except making the change in your tblSignatureManager table.

Or am I still not grasping your situation?

Regards

Jeff Boyce
Microsoft Office/Access MVP


AlwaysLearning said:
The query supplying the data to this report has:
CaseNumber
Address
City
State
Zip
SignatureMgr
Mgrphone
Mgremail

Each record returned by the query can have a different name in the
SignatureMgr field.
 
If you have a folder full of .JPG signatures, each with its "owner's name"
as the filename, you could store the fullpath/filename in a textfield in
your table, you could tell the report to insert the OLE object found at
[fullpath/filename]. You wouldn't even need to store the .JPGs in the
database itself!

Regards

Jeff Boyce
Microsoft Office/Access MVP

AlwaysLearning said:
It is a nightmare now! But you now know the problem. How do I return a
signature block in a query and place it into a report? Each signature is
in
the form of a .JPG.

Jeff Boyce said:
Thanks for the clarification.

So, let's see if I can paraphrase your setup...

You have a report that has multiple signature controls, each with someone
else's signature in it. You only want the correct signature to show.

Doesn't this design mean that you'll have to change the signature
controls
on your report every time a [SignatureManager] changes? That sounds like
a
maintenance nightmare!

What about the idea of having a SINGLE control that displays a signature
block, and having that signature block itself returned by the query,
rather
than the name of the Signature Manager? With a design like this, if your
organization adds a new Signature Manager (or fires one), you don't have
to
change anything except making the change in your tblSignatureManager
table.

Or am I still not grasping your situation?

Regards

Jeff Boyce
Microsoft Office/Access MVP


message
The query supplying the data to this report has:
CaseNumber
Address
City
State
Zip
SignatureMgr
Mgrphone
Mgremail

Each record returned by the query can have a different name in the
SignatureMgr field.

:

You've described the code/query you are using.

I asked about the underlying data structure. "How" depends on "what".

Regards

Jeff Boyce
Microsoft Office/Access MVP

message
The query returns the name of the party signing the letter. I match
the
name
to the name in the Select Case. The following code is in the Detail
Section
On Format event of each of the letters:
Select Case SignatureMgr
Case "Mickey Mouse"
MickeySig.Visible = True
Case "Minnie Mouse"
MinnieSig.Visible = True
Case "Donald Duck"
DonaldSig.Visible = True
End Select

The code I am trying to make work is a common function:
Public Function SigPic(xSigName)
Select Case xSigName
Case "Mickey Mouse"
SigPic = "MickeySig"
Case "Minnie Mouse"
SigPic = "MinnieSig"
Case "Donald Duck"
SigPic = "DonaldSig"
End Select
End Function

When this comes back to the calling code I then want to make the
statement
MickeySig.Visible = True but pick up the field from SigPic

:

It all starts with the data ... and it sound like there's a chance
you
use a
different field in your table for each signature. If so, that's
very
much
like you'd have to do it in a spreadsheet, but not in a relational
database.

Please describe the table structure with the data that feeds this
?report/?form.

Regards

Jeff Boyce
Microsoft Office/Access MVP

in
message
I have several letters which I "sign" with the appropriate persons
signature
by setting the image visible property to YES. Everytime staff
changes
I
need
to go into each of the letters and change the Select Case
statement
to
include the new name. Each of the letters have the same exact
field
names
and logic.

I have created a global function which returns the name of the
image
I
need
to set the visible property to True. The name is in a field.

:

This is a "how" question. "Why?" What will having this
capability
allow
you to do?

I'm not asking out of idle curiosity, but because there may be
other
ways
to
get done what you are trying to get done.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"AlwaysLearning" <[email protected]>
wrote
in
message
I have a field that contains the name of another field that has
the
Visible
property set to NO. I want to set the Visible property of the
contents
to
YES. Below is a basic sample of what I need.

Field1 = "Field2"
I need to have the equivalent of Field2.visible = true.

Thank you in advance for your help.
 
Jeff,

I really appreciate your patience. The folder with all the singnatures is
exactly what I have.

I created the text field and did put the fullpath/filename into the table.
In the report I created a bound OLE object with the Control Source the field
in the table containing the path. When I create the letter nothing appears in
the OLE object.

Jeff Boyce said:
If you have a folder full of .JPG signatures, each with its "owner's name"
as the filename, you could store the fullpath/filename in a textfield in
your table, you could tell the report to insert the OLE object found at
[fullpath/filename]. You wouldn't even need to store the .JPGs in the
database itself!

Regards

Jeff Boyce
Microsoft Office/Access MVP

AlwaysLearning said:
It is a nightmare now! But you now know the problem. How do I return a
signature block in a query and place it into a report? Each signature is
in
the form of a .JPG.

Jeff Boyce said:
Thanks for the clarification.

So, let's see if I can paraphrase your setup...

You have a report that has multiple signature controls, each with someone
else's signature in it. You only want the correct signature to show.

Doesn't this design mean that you'll have to change the signature
controls
on your report every time a [SignatureManager] changes? That sounds like
a
maintenance nightmare!

What about the idea of having a SINGLE control that displays a signature
block, and having that signature block itself returned by the query,
rather
than the name of the Signature Manager? With a design like this, if your
organization adds a new Signature Manager (or fires one), you don't have
to
change anything except making the change in your tblSignatureManager
table.

Or am I still not grasping your situation?

Regards

Jeff Boyce
Microsoft Office/Access MVP


message
The query supplying the data to this report has:
CaseNumber
Address
City
State
Zip
SignatureMgr
Mgrphone
Mgremail

Each record returned by the query can have a different name in the
SignatureMgr field.

:

You've described the code/query you are using.

I asked about the underlying data structure. "How" depends on "what".

Regards

Jeff Boyce
Microsoft Office/Access MVP

message
The query returns the name of the party signing the letter. I match
the
name
to the name in the Select Case. The following code is in the Detail
Section
On Format event of each of the letters:
Select Case SignatureMgr
Case "Mickey Mouse"
MickeySig.Visible = True
Case "Minnie Mouse"
MinnieSig.Visible = True
Case "Donald Duck"
DonaldSig.Visible = True
End Select

The code I am trying to make work is a common function:
Public Function SigPic(xSigName)
Select Case xSigName
Case "Mickey Mouse"
SigPic = "MickeySig"
Case "Minnie Mouse"
SigPic = "MinnieSig"
Case "Donald Duck"
SigPic = "DonaldSig"
End Select
End Function

When this comes back to the calling code I then want to make the
statement
MickeySig.Visible = True but pick up the field from SigPic

:

It all starts with the data ... and it sound like there's a chance
you
use a
different field in your table for each signature. If so, that's
very
much
like you'd have to do it in a spreadsheet, but not in a relational
database.

Please describe the table structure with the data that feeds this
?report/?form.

Regards

Jeff Boyce
Microsoft Office/Access MVP

in
message
I have several letters which I "sign" with the appropriate persons
signature
by setting the image visible property to YES. Everytime staff
changes
I
need
to go into each of the letters and change the Select Case
statement
to
include the new name. Each of the letters have the same exact
field
names
and logic.

I have created a global function which returns the name of the
image
I
need
to set the visible property to True. The name is in a field.

:

This is a "how" question. "Why?" What will having this
capability
allow
you to do?

I'm not asking out of idle curiosity, but because there may be
other
ways
to
get done what you are trying to get done.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"AlwaysLearning" <[email protected]>
wrote
in
message
I have a field that contains the name of another field that has
the
Visible
property set to NO. I want to set the Visible property of the
contents
to
YES. Below is a basic sample of what I need.

Field1 = "Field2"
I need to have the equivalent of Field2.visible = true.

Thank you in advance for your help.
 
I don't have quite enough information to tell what might be happening.

This thread has gone off (newgroup) topic by a fair ways. Consider
reposting your question in the .reports newsgroup, with the clarifications
you've come up with. That way, more eyes (and brains) will be able to work
on it. Otherwise, it's kind of hidden way down here in this thread.

Regards

Jeff Boyce
Microsoft Office/Access MVP



AlwaysLearning said:
Jeff,

I really appreciate your patience. The folder with all the singnatures is
exactly what I have.

I created the text field and did put the fullpath/filename into the table.
In the report I created a bound OLE object with the Control Source the
field
in the table containing the path. When I create the letter nothing appears
in
the OLE object.

Jeff Boyce said:
If you have a folder full of .JPG signatures, each with its "owner's
name"
as the filename, you could store the fullpath/filename in a textfield in
your table, you could tell the report to insert the OLE object found at
[fullpath/filename]. You wouldn't even need to store the .JPGs in the
database itself!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top