Results 1 to 13 of 13
  1. #1
    WiReLaD is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    12

    Working with Graphics


    Hi all,

    Im looking for some tips, help or advise on how to do something.

    I need a way of creating a graphic or something that will show an area of click (on/off) red = on, white = off) option buttons based on the a number typed into a textbox.

    eg. If a value of 100 is typed in, then the graphic shows 100 option buttons set in an equal square.

    I then need to click on any given button(s) to show that this item has been worked on.

    Any ideas?

    Thanks
    Mike

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I do not understand the question. Are you talking about creating a number of buttons based on user input or a bunch of buttons that are related to a source of data? Or are you looking to do conditional formatting on an existing piece of data?

  3. #3
    WiReLaD is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    12
    Hi and thanks for the response.

    Data source will be one textbox, input. This input might be anything between 1 to 500 - What I'm looking for is a way to creating is a series of circles of which I can click on 1 or many and for each clicked to turn red when selected.
    Not sure if you can see the attached but this is how my form will look like.

    The idea is to select a unit or collector system ID (S261) this will then populate a form with all S261 data which also includes a subform for history data. most important in the subform is the date, a date in time when the collector unit was worked on. then for each date line in the subform selected the idea is to show a graphic which shows selected red circles, buttons, options buttons...what ever, highlighting each sleeve that's been worked on.

    Click image for larger version. 

Name:	CollectorSys.jpg 
Views:	29 
Size:	109.7 KB 
ID:	11904

    Hope this helps.
    Mike

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    There is an example of something similar, but it is not trivial programming. It may give you some ideas.
    http://www.access-programmers.co.uk/...d.php?t=204786

    ChrisO, the author, has several routines and samples of Class Modules. The chess board/checker board is one.

    There is one I can't find at the moment, but it is a seat reservations system. I'll keep looking, it may be bookmarked on one of my other computers.

    Found the link http://www.access-programmers.co.uk/...0&d=1096839692

  5. #5
    WiReLaD is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    12
    Orange....thanks for the reply and links.
    Think you're right with the chest link...some heavy coding here and completely out of my scope of programming skills. The seating planner does give me some ideas however and well worth me looking deeper. I do like the click events and sure I can copy this idea.

    Again Thanks,
    Mike

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    It's a very interesting interface, but there are a lot of vba/Access developers/programmers that don't use Class modules.

    I'm retired and only wrote and used some simple class modules when working. I have downloaded some of ChrisO's samples, but I often get lost in the details.

    Keep us up to date with your project,
    and Good luck.

  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    This is an intriguing problem.

    Let me just see if I have the requirements straight.

    Whatever you have in the NUMBER OF BAGS IN COLLECTOR you want to basically turn into a graphical representation of a matrix.

    is the number of rows and columns relevant, or does it matter at all as long as their are the same number of dots as the number that appears in NUMBER OF BAGS IN COLLECTOR?

    Once the matrix is built, you want to then have an interface where you can click individual dots that would be highlighted either green or red?

    Does your NUMBER OF BAGS IN COLLECTOR have any restrictions on the number that can appear other than any number less than or equal to 500?

    If it does matter how many rows/columns appear in the matrix how is that determined?

  8. #8
    WiReLaD is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    12
    rpeare,

    Your bang on right... Number of bags in a collector comes from 1 entry, textbox - This could be anything from 1 to 500 but usually, these numbers would be even or creating a square or rectangle shape.

    As for the click events, YES, sometimes one bag from the collector unit might fail - its the idea that I can click the one option box that represents that bag and its position within the collector. Its a way of monitoring bag movements/repairs in & out should a bag fail before its expected life. usually bags last >5 yrs.

    How to determine - Not sure yet - I was thinking about evenly. Most of the collectors have 100 bags, 10 rows x 10 rows= 100

    I'm beginning to wonder if this might be best done in Excel?

    Mike

  9. #9
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Are the shapes for each possible number of bags pre-determined or is that part of the design process. Does the arrangement of the bags in your database have anything at all to do with how they are arranged in actual fact? For instance if you have 100 bags, in your access database it may be a square (10x10) but in practice it may be a matrix of 20x5. Or is the graphical representation you want in your database a real life representation of your bags?

    What I'm getting at is that you need RULES for how to create your matrices. If there's any human input whatsoever into the arrangement then you're going to have to provide for more user input.

    For instance let's say someone puts in 23. A prime number you can't arrange in a square. Are you going to want to, say, click on a matrix to design your pattern, or perhaps save certain arrangements so that, once created, you can call them up with a single click the next time you use that number?

  10. #10
    WiReLaD is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    12
    rpeare,

    The points you raise are excellent ones and ones I'd not really got round to thinking about as yet and until now! This is where my development skills fail me. Usually I develop as I go along...and this would have surely become an issue half way through the project.

    I suppose the shape and area is important, I'm now thinking maybe the user could type how many bags make up the front row, = 10 and how many rows 10. I still need a way to populate the area and with what? Could I get the user to drag and drop, pre-defind option boxes...and drop them into an area 1 at a time....maybe.

    I'm trying to find time to look at the seating plan arrangement Orange sent me the links for...kinda like the click events for each seat, and almost something on the grounds I'm looking for. At the minute, this might do and I'll have to predefine each collector size.

    I also think if it starts to become too complex, which it is, then I'll not do it in access and revert back to excel.

    excellent points you make...do you have the abillity to give me something to work with? I think you understand what the situation is and the requirements I now need.

    gluck!
    Mike

  11. #11
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Well this turned out to be a bit easier than I thought it would be. Here's a sample db that allows you to create a grid of up to 100 squares in a 10x10 matrix. I have two example arrangements (100 bags, 30 bags). When you choose the grid size it creates a grid of all green tiles of the size chosen. From there if there are any existing patterns they'll be listed in the list box below. From there you can choose a saved pattern and it will bring it up, you can save a new pattern or update an existing pattern by clicking the 'add/update' button. You'll be prompted to do an overwrite if there is a chosen pattern already in existence (I didn't put in a duplicate name check but it's easy enough to do)

    From here, you can use the same type of methodology for the second part of your problem which is basically to attach a grid/pattern to your record so that you can pull up the pattern and edit it the way you want. Keep in mind my green/red colors are only to tell you whether that 'bag' is available for the data entry portion. On your data entry screen you'll likely want to color only the tiles that are available and just have a background color of gray (instead of red or green) for any bag space that's not in use. You could also expand this to accommodate things like honeycomb arrangements etc.

    Anyway if you have questions on my sample let me know.


    One more thing, you will want to compact this database regularly if you use the example stuff I did.

    wirelad.zip

  12. #12
    WiReLaD is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    12
    rpeare, this is a top job - I think its something I can work with and I already understand it's workings. I'll need a few days to work this into my database, I don't database until weekends so it'll take me a few weeks.

    I' can't thank you enough for this...if I had your address, you'd definitely be on the Christmas card list.

    Thanks again,
    Mike

  13. #13
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Every once in a while an interesting problem comes along that I don't know how to address and it's kind of fun to figure them out.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Graphics in access
    By amrut in forum Forms
    Replies: 1
    Last Post: 02-06-2013, 08:53 AM
  2. Replies: 2
    Last Post: 11-30-2012, 03:11 AM
  3. Graphics glitch in relationships window
    By amancini in forum Access
    Replies: 0
    Last Post: 02-07-2011, 04:23 PM
  4. Message Graphics
    By pkstormy in forum Access
    Replies: 0
    Last Post: 01-01-2011, 10:48 PM
  5. Resizing Graphics in Reports
    By asearle in forum Reports
    Replies: 2
    Last Post: 11-16-2010, 03:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums