How to visualize bottles in a virtual storage rack (1 Viewer)

anb001

Registered User.
Local time
Tomorrow, 00:06
Joined
Jul 5, 2004
Messages
197
I have a database of all my wine. Just a simple one, where I can add/delete/update the information.

As I'm expanding the wine rack, I would like to keep track of where it is, so it is easy to find, when being used.

I have attached a small example of what I'm trying to achieve.

The example table have three different wines, 8 of each, and the location where each bottle is stored.

If Form2 is opened, is shows with the red dots all wine stored, which is in the list.

If Form1 is opened, it shows also all wine, but here Wine2 is highlighted in a different colour, so I can see where in the rack it is.

Question is, how do I get Form2 to show all wine from the list, and leave the rest of the red dots invisible, in order to see free space available?

And how how do I get Form1 to show all bottles, and highlight those I have searched for (this could be through a button, which shows location of the wine selected in e.g. a combo).

Thanks.
Anders
 

Attachments

  • Wine Example.accdb
    1 MB · Views: 101

JHB

Have been here a while
Local time
Tomorrow, 00:06
Joined
Jun 17, 2012
Messages
7,732
To get you started, I've made an example for you in form 1.
 

Attachments

  • Wine Example.accdb
    1.1 MB · Views: 97

anb001

Registered User.
Local time
Tomorrow, 00:06
Joined
Jul 5, 2004
Messages
197
Excellent. Thanks a lot.
 

JHB

Have been here a while
Local time
Tomorrow, 00:06
Joined
Jun 17, 2012
Messages
7,732
Velbekom, held og lykke med dit projekt. :)
 

anb001

Registered User.
Local time
Tomorrow, 00:06
Joined
Jul 5, 2004
Messages
197
JHB,

I have a small issue, with having too many controls. I solved that dividing the wine rack into two subforms, which I then added to a "Main form". That works fine, in the sence that I can get the last few controls included.

However, in your code, I need to specify both subforms in the For ... Each statement and also in the Do ... Loop statement.

I can make it work, if I do one or the other, but not both subforms at the same time. Can you help with correct syntax?

Thanks.
 

JHB

Have been here a while
Local time
Tomorrow, 00:06
Joined
Jun 17, 2012
Messages
7,732
Could you post your database with the subforms?
 

Mark_

Longboard on the internet
Local time
Today, 15:06
Joined
Sep 12, 2017
Messages
2,111
I may have a way to both make it easier (less controls) AND more obvious as to which positions are filled. I used one box for a background (rather than multiple lines) and one box for each position. Please see the attached.
 

Attachments

  • Wine Example.accdb
    1.2 MB · Views: 90

anb001

Registered User.
Local time
Tomorrow, 00:06
Joined
Jul 5, 2004
Messages
197
JHB,
File is uploaded zipped, as it is above the 2mb limit.

Mark,
Yes, I thought of your way as well to limit the controls, however I prefer the round controls in this case, and I don't think there any other way to get get round controls.
 

Attachments

  • Wine DB.zip
    216.7 KB · Views: 57

JHB

Have been here a while
Local time
Tomorrow, 00:06
Joined
Jun 17, 2012
Messages
7,732
Try it now, database attached.
 

Attachments

  • Wine DB.zip
    258.6 KB · Views: 63

anb001

Registered User.
Local time
Tomorrow, 00:06
Joined
Jul 5, 2004
Messages
197
JHB,

Thanks a lot again.

I have now finished all the naming, and trying to test.

All red/green circles are updated as Visible=No. When I run the form, all bottles in the table updates correctly, as per what is updated in the table.

However, if I delete at bottle from the list, it still shows up, as visible property now equal "Yes".

I tried copying your initial code, were all are changed to Visible=False, but that didn't work. Probably because of the subform.

EDIT:
It seems the lower half is working fine, when adding/removing a bottle. On the upper half something seems wrong. I updated a bottle in each slot. They all show. When delete from the list, it still shows, as visible=yes. If I manually change Visible property to "No", it is gone when form is opened again. Now I add the wine to same slot, and it shows again. No the weird thing. If I delete the bottle in the list again, then it no longer shows in the form.

Any idea why this happens?
 
Last edited:

JHB

Have been here a while
Local time
Tomorrow, 00:06
Joined
Jun 17, 2012
Messages
7,732
Try it now.
 

Attachments

  • Wine DB1.zip
    257 KB · Views: 52

anb001

Registered User.
Local time
Tomorrow, 00:06
Joined
Jul 5, 2004
Messages
197
Finally finished naming all the controls, and have tested all of them, and it seems to work now. Haven't found any issues.

Thanks again JHB. Should I pass by Jylland on my way from Sjælland, I'll bring you some wine :)
 

JHB

Have been here a while
Local time
Tomorrow, 00:06
Joined
Jun 17, 2012
Messages
7,732
You're welcome. :)
Perhaps in the future it may not pay to pick up wine from Germany, have heard that the government is going to change the tax system. :):)
 

Users who are viewing this thread

Top Bottom