Full Version: Combos, 6 of them. Loop Perhaps? Help!
UtterAccess Forums > Microsoft® Access > Access Forms
freespiritcherishes
Hi everyone...
On a table i have 6 hyperlink fields
ItemLinks 1 to 6.
On a form I created 6 combos. One for each ItemLink field.
Eg. CDItemLink1 has a hyperlink to a document on my hardisk.
CDItemLink1Cbo looks up all the records where a user has entered a hyperlink in this field.
But i don't want all 6 combos to show. I want 6 combo buttons numbered 1 to 6 each when clicked will make visible their respective combos so that the user can select from that combo.
But if i make the combo visible on the onclick event of each button, access won't let me make the combo itself invisible when it has lost the focus, so i can't hide the control for when another combo button is clicked and an alternative combo appears. As a result all combos will appear when the idea is to have all 6 sitting on top of each other where they only take up one line of space instead of 6 on my form.
Again, the word loop or case comes to mind, but as per usual, I have no idea. Ive tried everything!
Can anyone help?
Jack Cowley
Hmmm. Each combo only has one item, right? Then why not set up your table in a normalized fashion:
blHyperLinks
HyperLinksID (PK)
HyperLink
Now you can tell the combo box which value to show with Me.ComboBoxName = 3 or whatever.
My 3 cents worth.
hth,
Jack
freespiritcherishes
mmm... brb!
ALaRiva
Jack,
I'd ask for a refund on that 3 cents. This member posted this question on another forum about 5 minutes before posting here. They are receiving help on the other forum, which is probably why the 'hmmm brb' message came.
Anthony
freespiritcherishes
lol... sorry didn't know actually. What does PK mean? and could you give me the link, everything looks repeated on here, im going blind going down the lists!
freespirit
aka donna
Jack Cowley
Hiya Anthony!
ong time no speak... Must be that the San Berdoo weather has kept you out chopping wood for the fireplace...
HAs for the poster... Well, you can guess my response.... Thank you for bringing me up to speed on this as I do appreciate it... I just retrieved a supposedly decent 1999 Zinfandel from the cellar so I think I will see what if is really as decent as I was lead to believe... OK. I couldn't wait... It is OK, but I have a far better one but you would expect that when one cost $4 and the other $25...
Otrust you are well and that your business is going like a Santa Ana driven fire...
Jack
Jack Cowley
Donna -
You have lost me... I can tell you that PK = Primary Key, but as to the rest of your question about a link, etc. I am sorry to say that I don't know what you mean...
Jack
S_R_T
PK means primary Key
to me it is the one piece of information that identifies that whole row of data in a table
now other user that are 1 million times better than i am have a more profesional definition, but i think we will get to the same point
ALaRiva
Donna,
The reason you are confused is because you are jumping back and forth between boards. You were offered a similar suggestion to Jack's on the other website forum. My suggestion would be that you stick to one Forum for this Question, and if you need more specific help, then by all means ask, but to try and help you while you go back and forth would be pointless, IMHO.
Please don't take this as a "lashing" or anything like that, I just think it would help you better solve the problem by focusing on one specific place helping you with one specific method.
-Anthony
ALaRiva
Hey Jack,
San Berdoo weather has been pretty good lately. I'm just hoping the rain will hold off a bit longer. I'm working in Irvine (2 hour drive in traffic), but on my drive home, I take a back route through State Highway 74, which basically slices the mountain and has a ton of curves. I'm won't be driving that during the rainy season as it's very narrow already. Hopefully it'll hold off til this project is up and I can maybe find something opposite the mountain.
Enjoy the wine! Any upgrades to the closet . . . erm . . . Cellar!
-Anthony
Jack Cowley
Anthony -
IKES! Commuting to Irvine! I think I know which road is State Highway 74 and I give you 100 gold stars for being willing to drive it, even in dry weather. You are a brave man to take any route as Irvine is forever away from where you live. I remember the traffic in So. California and I am glad that I don't have to drive it anymore. The traffic here is just as bad, but since I no longer have to commute it really doesn't matter.
The wine is OK and the 'cellar' has received no 'upgrades'...
Jack
freespiritcherishes
Oh dear. Don't know what Im doing. Thought i asked in one place and that was here. Guess Im getting confused. I thought Jack was talking to me but now that I read back, it was you talking to Jack. Sorry Anthony. Sorry Jack. No wonder you didn't know what i was on about.
I have posted another question on several combos re dates, which Ive since sorted, but this is a different problem re combos that lookup hyperlinks.
donna
Jack Cowley
Donna -
Not to worry! Anthony and I have known each other for a while and we occasionally jump in where maybe we shouldn't, as we certainly did not mean to confuse you. My apologies for causing you to wonder about what was going on...
If you look back at my first reply to you you will see my suggestion of using a table with 6 records (one for each hyperlink) instead of 6 fields in a single record. If you do that then you can use one combo box for all the hyperlinks and you can set which hyperlink shows depending on some other criteria. I am not sure exactly what the purpose of your combo box(es) is/are, but maybe between Anthony and I we can find a solution for you.
Again, my apologies for creating confusion for you.
Jack
freespiritcherishes
Yes, I understand Jack.
But there is actually a need to have 6 doclinks for each record. Your suggestion which ultimately is the more practical and easiest method would generate alot of records ie.. 3 records, with 18 documents would be 18 records with 18 documents, and there are too many documents to do it that way. Am i making any sense?
donna:-)
Jack Cowley
Donna -
hew! I am glad you understand as it was certainly not our intention to confuse you...
I am not sure where you are headed with the documents, but I can tell you that normalization of your data is important and if it results in lots of records then that is the way that it is. Otherwise you will have a situation where it will be very difficult to get out the data that you need. Now maybe I am preaching to the choir in that you are completely familiar with normalization and your data is normalized. Generally speaking if you have 6 fields in a record that are all hyperlinks then I tend to assume that the data is not normailized. I admit that I do NOT understand what it is you want to do but lots of records may be exactly the way that you should go. Better more tables with lots of records then less tables that are not normalized.
Are we going round and round? Are you sure your data is normalized? If you can give me a specific example of what you are trying to do I will try and assist you. I may not be here much longer this evening, but I will be around tomorrow...
Jack
freespiritcherishes
o oh.. Normalized, that sounds like tecchie speak to me..
ell.. em. I think so. Everything works deliciously well except for my combos. They all work in the simple way, ie.
CDItemLink1Cbo
ControlSource = CDItemLink1
BoundColumn =1
RowSourceType = Table/Query
RowSource = SELECT ContactsDiary.CDItemLink1
FROM ContactsDiary
WHERE (((ContactsDiary.CDItemLink1)<>" "));
CDItemLink2Cbo
ControlSource = CDItemLink2
BoundColumn =1
RowSourceType = Table/Query
RowSource = SELECT ContactsDiary.CDItemLink2
FROM ContactsDiary
WHERE (((ContactsDiary.CDItemLink2)<>" "));
and so on for the other 4.
1 record may have 1 hyperlink used out of the 6 in it and in another record, the user may have used all six hyperlinks.
Which is why i created a separate combo for each CDItemLink field and they work in the simple way. Im just trying to get them to appear one at a time by making each one visible by pressing a button and invisible when it loses focus. But Access won't let me hide an object that has a focus which in this case would be any one combo at any one time.
Thank you for your assistance jack and anytime would be fine.
donna
Jerry Dennison
Jack is correct in trying to get you to normalize your table structure. As for the increase in number of records, what difference would that make? Ultimately, there is no difference in the size of the DB if you normalize vs. non-normalize. In fact, a normalized structure often yields a smaller DB footprint than the non-normalized one. This is especially true if you have a lot of "empty" fields. Access will allocate enough memory for the entire record whether it is fully populated or not.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.