473,395 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Expanding a number range from AC data entry form into table

I am building an inventory database that needs to track individual items. Each item has a unique number associated with it. However, we receive these items in bulk quantities, and distribute them likewise. I have set up a data entry form to input the start of the item number range, and the end of the item number range. For example, the item range would look something like this -- 1056-56701 through 1056-56800. The item number is always 4 digits followed by a dash and 5 digits. I am looking to expand the range that is put into my data entry form, so that each individual item number within the range is saved to my table. In this case-- 1056-56701, 1056-56702, 1056-56703, 1056-56704....156-56800. I also need to save the corresponding info for each item range as it is saved as an individual number. That would include things like 'date received', 'size', etc.

I have read some other responses to similar problems, but I still can't get this to function properly. Any thoughts?
Mar 29 '16 #1
6 992
PhilOfWalton
1,430 Expert 1GB
Please clarify. Am I correct in assuming that you have a form with 3 fields on it
Item your 1056
StartRange your 56701
EndRange your 56800

Then you want to press a button and add these 100 numbers to a table in the form of a string. Let's call these numbers ItemIndividual. I presume this will be a Unique Key.
At the creation stage you want to add DateReceived & Size. Does that only apply to the Item or the ItemIndividual as well.
What additional information is needed against the 100 ItemIndividual numbers. How do you intend to display the 100 numbers (you can display about 30 lines on a continuous form). How do you intend to find the ItemIndividual?
Don't worry.creating the ItemIndividual string is easy with a loop

Phil
Mar 29 '16 #2
jforbes
1,107 Expert 1GB
There are usually two way of tracking Inventory Items, Serialized and Lot. Serialized Items each have a Unique Number that is either assigned to them as they are received or captured during receipt. Lot items are similar in that the lot is either assigned or captured at receipt of the items, but it not unique across the items; a single lot identifier can be assigned to multiple items.

It sounds like you are assigning numbers to Serial Tracked items on receipt. Usually in this case, a Form is presented to the Clerk, person receiving the material. They enter in the Item Number (or Part Number specific to the type of item to be received) on the Form and the Form determines the Next available Serial Number. The Clerk then enters in how many are to be received into inventory and clicks a "Receive" button of some sort to:
  • Print out the Serial Number Labels to be placed on the Individual Items.
  • Create entries into a SerialTrack table for each individual Serial Number used. Often the Item Number is included if there is a chance that the same Serial Number can be used on different Items.
  • Receive the Items into Inventory by incrementing the on hand counts, or creating inventory transaction records, or both.

I've worked on two different systems that insert Serial Numbers into the SerialTrack table. Both of them use a loop that counts from the First Serial Number to the Last. The Distribution Style system did this early in the process and stored the results into a temp table and when the "Receive" button was pressed an Insert Query was ran with the Temp Table as the Source Table. The other, Manufacturing System, looped through and created the Serial Numbers and performed individual inserts when the "Receive" button was pressed. There was very little real advantage to either system, other than the one with the Temp Table also gave a method to manually enter the Serial Numbers.

So how are you going about this and what problems are you facing?
Mar 29 '16 #3
I actually have a only 2 fields on my form. I could separate out the prefix and affix, but I kept them as one string because only the entire number is unique. So, if I were to separate those numbers into 3 fields, I would no longer have a unique key. The other corresponding info like DateReceived and Size applies to ItemIndividual. I intend on finding the ItemIndividual by creating a search form. The search form will allow you to search the actual number, or search by date, and other fields.


I don't necessarily need to display these 100 numbers in a form. I can do so with a query. But, I do need to track each item to the end of its life. That includes; which items were issued and to whom, the date they were issued, whether that item was used, etc. When an item is "used", I need to take it out of inventory.
Mar 29 '16 #4
JForbes, that is really great information. Thank you. So to answer your question, I am facing several problems. The biggest is that, this is my first attempt at creating an Access database. So I imagined that I would have two major tables-- a Receivments table and a table displaying the Ownership of those items and other important info. It is critical to know who the item was issued to (the owner), especially since owners can transfer individual items and items in bulk between one another. Items can also be "used", and at that point, I would want to take them out of the inventory.

So my biggest struggle is conceptualizing how this will actually function. We need to track individual items, but at the same time, we want to be able to input data and create reports using a range of item numbers.
Mar 29 '16 #5
PhilOfWalton
1,430 Expert 1GB
I have a form with 3 fields
Item
StartRange
EndRange
and a command Button CreateNumbers
Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Function OutPutKey() As String
  5.  
  6.     Dim i As Long
  7.     Dim OutputStr As String
  8.  
  9.     For i = StartRange To EndRange
  10.         OutPutKey = Str(Item) & "-" & Format(i, "00000")
  11.         Debug.Print OutPutKey
  12.     Next i
  13.  
  14. End Function
  15.  
  16. Private Sub CreateNumbers_Click()
  17.  
  18.     OutPutKey
  19.  
  20. End Sub
  21.  
I leave it to you to check the 3 input numbers are numeric and that EndRange > StartRange

Phil
Mar 29 '16 #6
jforbes
1,107 Expert 1GB
I think you are on the right track. This may be helpful to you: Database Normalization and Table Structures

This is the table structure I would create based on what you have provided so far, you may want different names, but this should give you the basic idea:
  • Locations - You may want to call this Owners. This is would be a list of all the places that an Item could be stocked. Depending on how granular you need to get with this, it may just a basic location, like a persons name or Employee ID. But if you need to really pin things down further, like by bin locations, you may need to split this table up a little further.
  • Items - A table for the Item and all it's information and with a Primary Key of ItemNumber. Often, an OnHandQuantity is maintained at this level.
  • SerialTrack - A table for the information that is tracked per Individual Item with a Primary Key of SerialNumber. Or if you could have the same Serial Number used multiple times, you may want a Compound Key of SerialNumber and ItemNumber. It sounds like from your description that this is where you would put the Foreign Key for the Locations, so that you can determine each Individual Items Location.
  • ItemTransaction - A Table that has a record inserted into it anytime an items is Received, Transferred, or Shipped. This would be your history Table. You may not need this, but it's a good idea to have it. It would include the ItemNumber, a FromLocation, a ToLocation and a Quantity. Depending on how you big our database will get, you could use queries on this table as the basis for your OnHandQuantities instead of maintaining a number in Items. Sometimes both methods are used in attempt to bridge the gap between the accuracy of a Query and speed of looking up a single number. Typically in this case the Query is run periodically and the results are stamped back onto the Item Record.
  • SerialTrackTransactions - A Table that has a record inserted into it for each transaction against a SerialNumber. You would only need this if you need to keep a history of every place a Serial tracked item has been. This table can be a lot of work to maintain because you won't be able to do bulk inserts against it, so it will need a looping structure to iterate through Serial Numbers every time an Item is moved.

With a structure like the one above, you can Query against the SerialTrack Table to Report by SerialNumber, or Query against the Item Table to Report by ItemNumber, or lastly Query against the Locations Table to see who is hording all your inventory.

You would then need a Form or Forms for Receiving, Shipping and Transferring. These are all very similar functions and in your case, you may be able to consolidated it down into one Form. And since you have the need to ship a specific range of serial numbers from one Location to another, you probably should implement a Temp Table approach. That way you can tightly define the Serial Numbers that need to be transferred. Because there will be someone that takes a Serial Number from out of the middle of a batch, or one gets dropped and broken which messes up the nice neat range of Serial Numbers that are to be transferred.

Wow, that was a lot more than I intended to type this morning.
Mar 30 '16 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
1
by: Alex Wisnoski | last post by:
Access 97SR2-I am trying to create a Job Position data entry form based on a table. The form has 15 fields on it. I want to use a combo box to look in the table and see if the position number...
2
by: edworboys | last post by:
I have designed a data entry form with a number of fields and a sub form. The first field (Country) is a combo box and the user selects a country. This, in turn reduces the number of options in the...
1
by: Alex.Wisnoski | last post by:
I have a data entry form with a combo box to look up an entrant's name. If the name is already in the table then it pulls up the record and that part of the form works fine. If the name isn't in...
1
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting...
5
by: Aspnot | last post by:
Background: I have a data entry form that is bound to a DataSet. This DataSet contains 9 tables and the form displays data from each table in textboxes, not a DataGrid. One of the tables in the...
2
by: filbennett | last post by:
Hi Everyone, I'm generally unfamiliar with Access form design, but have programmed Cold Fusion applications for a couple of years. I'd like to build a data entry form in Access that allows the...
1
by: Gino Perruti | last post by:
I am converting an old ASP data entry form to ASP.NET 1.1. The old form has a script block that dynamically adds rows to a table that contain cells with a textbox for quantity, product...
4
by: JohnnyMid | last post by:
I am working on a database, and have been having some trouble with the auto number feature. Occasionally, the data entry form is saving blank records into the table. I am trying to figure out a way...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.