 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 22nd, 2005, 12:48 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Jeff,
You are there! What I've always done is have a table to store the image information, another to store the software title info, and a third to connect them.
I.E.
Image1ID SoftwareID
1 1
1 2
1 3
2 2
2 3
3 1
3 3
Make sense?
Kevin
dartcoach
|
|

August 22nd, 2005, 01:02 PM
|
|
Authorized User
|
|
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This seems like it will work, and I am very excited!
Now I need to get this info. into my frmImages. How do I go about having them choose Software to link to the opened Image? Can I still use a list box?
|
|

August 22nd, 2005, 01:07 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Create a subform that links on the image id to the software Id. I usually use combo boxes to choose which software is on the image, instead of a listbox. It's much easier.
Make sense?
Kevin
dartcoach
|
|

August 22nd, 2005, 01:10 PM
|
|
Authorized User
|
|
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry if I'm being redundant, but what I'd really like is for someone to be able to open the Images form and see a list box, populated with Software names and be able to select the ones they want. Is this possible?
|
|

August 22nd, 2005, 01:15 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Yes. You have to populate the listbox from the software titles. Once they've chosen the titles they want, you must programmatically insert a record into your table for the relationship.
Kevin
dartcoach
|
|

August 22nd, 2005, 01:23 PM
|
|
Authorized User
|
|
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I can populate the listbox without trouble, but how do I go about "programmatically [inserting] a record into [my] table for the relationship"???
Now we're kind of back at square one, although now it might actually work with the m-to-m relationship.
|
|

August 22nd, 2005, 01:28 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Jeff,
Once they've selected the items from your list box, do you have a button for "Update Image"?
If you do, you have to check for each selected item and run an sql statement to insert the record.
Have you used VBA? It would have to be there. Could you send me your database? I could play with it and send it back.
Kevin
dartcoach
|
|

August 22nd, 2005, 01:31 PM
|
|
Authorized User
|
|
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I can easily create a command button for updating it. I have very limited knowledge of VBA, but can navigate someone else's code with a good amount of understanding. I'll send you it now.
|
|
 |