Solved

Access 2013 Data Macros

Posted on 2014-09-24
8
426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 34

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 34

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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

636 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