Solved

Access 2013 Data Macros

Posted on 2014-09-24
8
413 Views
Last Modified: 2014-10-02
I'm working on a warehouse database project.  I'm attaching a sample database with 2 tables.  The locations table has all the warehouse locations listed.   A01, A02, B1, Etc.

I have a lookup function on the Table1 that gets the locations from the locations table. It is setup for multiple values.  I need this because some products will have to be stored in multiple locations.  That part was easy.
What I would like to do now and I think the data macros would be the best option is that when a location is selected in table 1 it sets the occupied field in the locations table to true or it hides the location so it can't be selected again.
Database-12.accdb
0
Comment
Question by:Mwvarner
  • 4
  • 2
  • 2
8 Comments
 
LVL 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
As far as I understand: A product can have multiple locations. A location can only have one product?

I would model this explicitly using a bridge table. Cause this allows to declare this kind of relationship, instead of using code to maintain it.

Relationship diagram
with

Bridge table data
0
 

Author Comment

by:Mwvarner
Comment Utility
That will work but one of the things I'm trying to work out is how to visually represent the locations and indicate which locations are available and which ones are vacant.  Otherwise how can someone who is receiving the pallets know where to tell someone to put them?
0
 
LVL 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
Use a concatenation function like Allen Browne's.

And use a dialog for assigning the locations.
ConcatRelated.vbs
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
Comment Utility
<<What I would like to do now and I think the data macros would be the best option is that when a location is selected in table 1 it sets the occupied field in the locations table to true or it hides the location so it can't be selected again. >>

  Just as a general comment, I don't think you really want that.   The concept of not storing a product in a given location more than once is not a good one.  Most inventory systems have two levels:

1. Location
2. Lots

Even for the first, you need to be able to handle multiple entries as more often than not, you've got some accounting tied in.   Your accounting may be done on FIFO, LIFO, etc.   In order to account for that, you need to be able to receive  to a location multiple times.

So normally, you'll have tables that look like this:

tblLocations - One Record per location
LocationID - AN - PK
LocationCode - Text - CK1 - "AA01", "AA02", "AA03"
LocationType - Long - Floor, Rack, Bin etc

tblItems - One record per item
ItemID - AN - PK
Descritption

tblLocationQtys -
LocationQtyID - AN - PK
LocationID - Long
ItemID - Long
QtyReceived
ReceivedOn
Cost

 This allows you to have:

1. Different items in the same location.
2. The same item in the same location several times (so you can keep track of multiple receiving or costs)

 It also let's you handle cases where you might now have a rack, which can only hold a single pallet, but then you change to a floor setup, which might hold a dozen pallets.

 So you really do want to allow for multiple records of an item to exist in the same location.

Jim.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Mwvarner
Comment Utility
I still don't see how I will be able to visually represent the locations and show which locations are available and which ones are filled.   Do you know of any warehouse data base examples that do this?
0
 

Author Closing Comment

by:Mwvarner
Comment Utility
This solves the table structure I think but it still doesn't answer my question on how to visually represent the storage areas and which locations are occupied and which are not.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<I still don't see how I will be able to visually represent the locations and show which locations are available and which ones are filled.   Do you know of any warehouse data base examples that do this? >>

  You would do that on the tblLocations record; a simple Y/N of "IsLocationFilled".

  Then it's simply a WHERE (criteria) check on the flag:

 SELECT * FROM tblLocations WHERE IsLocationFilled = False

  just as you might be putting a pallet away and want only locations that will hold pallets.

Jim.
0
 

Author Comment

by:Mwvarner
Comment Utility
That should work.

Thanks Jim
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now