Wrox Programmer Forums
|
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
 
Old August 22nd, 2005, 12:48 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old August 22nd, 2005, 01:02 PM
Authorized User
 
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old August 22nd, 2005, 01:07 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old August 22nd, 2005, 01:10 PM
Authorized User
 
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old August 22nd, 2005, 01:15 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old August 22nd, 2005, 01:23 PM
Authorized User
 
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old August 22nd, 2005, 01:28 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old August 22nd, 2005, 01:31 PM
Authorized User
 
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
LIST BOXES Vision G Access 10 May 27th, 2006 01:45 AM
Dynamic List Boxes swhite Access VBA 10 September 11th, 2003 01:27 PM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 04:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.