Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2013 Data Macros

Posted on 2014-09-24
8
Medium Priority
?
438 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 36

Expert Comment

by:ste5an
ID: 40343495
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
ID: 40344757
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 36

Expert Comment

by:ste5an
ID: 40345596
Use a concatenation function like Allen Browne's.

And use a dialog for assigning the locations.
ConcatRelated.vbs
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 1500 total points
ID: 40345991
<<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
 

Author Comment

by:Mwvarner
ID: 40346193
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
ID: 40357859
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 58
ID: 40357881
<<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
ID: 40358431
That should work.

Thanks Jim
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

824 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