Can Hyperlink Call Subset of Table?

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hello:

If I have a textfield (form) which has a datatype = 'Hyperlink', can I
somehow call a subset of data in a table or form?

For instance, let's say I have a textbox whose control name = "X", can I
bring up a form that will only contain the table data where field name =
"X"?


Tom
 
Hi,
What you are describing would best be accomplished with:
DoCmd.OpenForm "formName",,,"FieldName = 'X'"

Check out the OpenForm method in Help and look at the "Where condition" argument.
 
Dan:

Thanks so much for your prompt reply... I'll check it out momentarily.

Would you mind watching this thread since I'll probably post follow-up
questions?

Thanks in advance,
Tom
 
Hi Tom,
I'll certainly keep an eye on this thread but I may not always be so quick with
replies!
 
Hi Tom,
To solve your immediate problem...
I meant for you to substitute the real name of your field for "FieldName"
Obviously your table does not have a field called FieldName

Just to make sure you understand what's happening...
The Where condition argument is to restrict the results returned from a table or query,
whatever happens to be the record source of the form you are opening.

It's like the Where clause in a SQL statement (query) without the word "Where"
So you can restrict the results by saying: Show me only the records where a certain field
has this value.

Is this in fact what you want to do?

On another note, your tables are not properly normalized.
You should not have field names that represent data, such as
2004-Q4

This will cause you headaches when querying data not to mention you have to add
fields to your table every year until you reach the limit and cannot add anymore.

I never open attachments in the newsgroups (and in fact this practice is frowned apon).
 
Dan:

Thanks for the feedback...

I understand this issue about attachment... so, let me try to put the
"picture" into words.

This is what I currently need to achieve/work on:
- I work on a Balanced Scorecard prototype db
- I want a single form with lots of small "boxes" (textfields)
- Each textfield (I might have 200 or so) will store a value which value
"drives" the color of the textbox. For instance, if the value = 100 (100%)
then the background color is green. If it's e.g. "25", it'll be red.
- In the end, I simply want to be able to click on a "red box" and see the
underlying data (25% plus other fields that describe "why it's only 25% such
as missed deadlines, resource constraints, etc.").

The last bullet is the challenge I'm trying to solve at this time. "Click
on a texfield" and bring up a query/subform/report that shows the source
data".

Lastly, I kinda have had my concerns about the normalization problem myself.
You're absoulutely right, it might become a nightmare to maintain hundreds
of textfields (specifically, as they will be pulled in queries and linked to
forms).

Based on the information I have shared w/ you, would you mind sharing some
more insights w/ me as to how I can best design the table structure.

Essentially, I need to be able to store data about
Task 1.1
Task 1.2
Task 1.2.1.
Task 1.3
....
....
Task 200.1
....
etc.


Looking forward to any pointers you might be willing to share w/ me.


Tom
 
Sorry Tom but you've lost me!
I don't have a clear picture of your data so I can't really say what the best table structure
would be. You should be able to use the OpenForm concept to see a subset of data.
Having 200 text boxes on one form is really not the way to go. A list box or combo box
would probably be a better way.
 
Dan:

Thanks anyhow... I think you already have helped me a bit w/ the info of the
previous threads.

The attached JPG would have made the idea clearer... but I understand that
it has been become quite "dangerous" to open attachments in this forum...
'truly sad.

Again, thanks,
Tom
 
Back
Top