Displaying x combo boxes & positioning them (1 Viewer)

retro

Registered User.
Local time
Today, 06:15
Joined
Sep 5, 2003
Messages
69
I'm making a database of (electronics) chips in Access 2010. These have varying amounts of pins - 6, 8, 14, 16, 18, 20, 24, 28, 32 or 40.

On a datasheet, they are drawn as per the following image:

http://www.beavisaudio.com/library/555/555_556_Pinout.jpg

As you can see, the pin numbers run down the left hand side, then up the right hand side.

I have a table, tblPinouts. This has a text field called PinoutName and 40 number fields - Pin01 etc. It also has another number field - PinCount.

On a form - frmPinouts - the pin fields will be entered via combo boxes, which get their data from a table - tlkpSignals. However, I want the form to be visual, as per the picture. I've managed to draw a chip using boxes (as this seems preferable to using pictures), like this:



However, I want to adjust the 'drawing' accordingly for each chip. This means doing several things:

  1. Extending the main rectangle downwards
  2. Ensuring there are x small rectangles around the main rectangle at set points
  3. Ensuring there are x labels inside the main rectangle at set points
  4. Ensuring there are x combo boxes around the 'drawing' at set points

How can I ensure that only the first x combo boxes and small rectangles (x=PinCount) are present when a record is loaded, and that they are arranged correctly?

Thanks in advance for any help offered! I did try doing a search, but couldn't find anything relevant - that might just be me not choosing the right keywords!
 

bob fitz

AWF VIP
Local time
Today, 06:15
Joined
May 23, 2011
Messages
4,727
Can you post a diagram of your table relationships.
 

Mr. B

"Doctor Access"
Local time
Today, 00:15
Joined
May 20, 2009
Messages
1,932
One approach for accomplishing your goal would be to create a form with a record source of your table and then create a tab control that would have a tab for each possible chip configuration. One each tab you can create the size and requirements for the location of pins for each chip design including the appropriate combo boxes. Each of the controls would be bound to the appropriate field in your table. By setting the Style property of your tab control to "None" you can then programmatically show each of the chip designs and each appear to be the only available one at any time and do this based on the selected type of chip.

These are just my thoughts about one way to approach the issues.

Hope this helps to point you in a direction that will ultimately help you reach your goal.
 

retro

Registered User.
Local time
Today, 06:15
Joined
Sep 5, 2003
Messages
69
Can you post a diagram of your table relationships.

There are no relationships at present as I'm trying to get my head around accomplishing the form update and there's only one main table and two lookup tables:

tblPinouts
PinoutsID [PK]
PinoutName
PinCount
Pin01
Pin02 etc.

tlkpPinCounts
PinCountID [PK]
PinCount

tlkpSignals
SignalsID
Signal

tlkpPinCounts has a list of the total number of pins possible (6, 8, 14 etc.). It's used as a row source in the form to update PinCount in tblPinouts, but tied to PinCount instead of the primary key - so that it outputs the second column (6 instead of 1, 8 instead of 2 etc.)

tlkpSignals has a list of all the possible signals that could run on a pin. It will be used as a row source on the form for all the combo boxes - I guess a one-to-many relationship with all those fields in tblPinouts, then.

One approach for accomplishing your goal would be to create a form with a record source of your table and then create a tab control that would have a tab for each possible chip configuration.

Ah, interesting! That's certainly something to explore - it does sound like the simple option! :) Thanks!
 

Fran Lombard

Registered User.
Local time
Today, 01:15
Joined
Mar 12, 2014
Messages
132
I couldn't help myself and wanted to take a crack at this form design
take a look at the attached db - it is in A2007 format

The screen is called chips. The vb is a little crude - rather like using a blunt hammer but it seems to do what you want.

You would still have to dynamically assign control sources to the combos but this should get you going.
 

Attachments

  • ChipDesign.zip
    58.5 KB · Views: 86

Fran Lombard

Registered User.
Local time
Today, 01:15
Joined
Mar 12, 2014
Messages
132
Attached is a version of the db that dynamically links the combo boxes to the underlying fields in tblPinouts

There probably is a more elegant approach using arrays of controls but I don't have the experience to do it.

The approach taken assumes a maximum of 40 pinouts.

The limitation of this approach is if you ever encounter a chip design with more than 40 pinouts. This would necessitate an expansion of table tblPinouts and a modification to the screen to support the additional fields.

It would probably be better to redesigned tblPinouts to store a separate record for each Pin - but that is up to you to decide.

See if this helps
Fran
 

Attachments

  • ChipDesign.zip
    56.6 KB · Views: 73
Last edited:

retro

Registered User.
Local time
Today, 06:15
Joined
Sep 5, 2003
Messages
69
Wow, that certainly works! Thanks!

I'll take a look at the code and get an understanding of how it works. It seems to work pretty well, actually. There's a bit of a delay when it loads the full 40-pin chip then decides it only needs e.g. a 14-pin chip, but I can live with that :)

For my current purpose, this will be fine... although I might look into ways of fine-tuning it in the long run. You've both given me great starting points... and a solid solution, too! Many thanks!
 

Users who are viewing this thread

Top Bottom