Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    dluga20 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    23

    Quote Originally Posted by Locke_Valken View Post
    We work on large scale engines and parts. there are 4 main stages: receiving, inspection, repair/machining, and shipping.

    1. We receive parts to go into temporary storage before inspecting them
    2. We enter the bulk number of specific parts into the form and it adds that quantity to the table for those parts
    3. Each of these part table IDs will be 6 digits, they cannot duplicate in that table, but will duplicate across tables
    4. There needs to be some kind of calculated/lookup/concatenated field in another table for a full job number/serial number to be unique.
    5. This would then generate the ID (this is for the label sticker) and would automatically set the condition of the part to "Pending Inspection" by default
    6. It seems from that point a query would have to be created to identify all parts that have a condition set to "Pending Inspection" that would have to be updated with condition, repair notes, and other descriptive information.

    This process has been being done almost exclusively through Excel, Acrobat, and LiveCycle - I cant stand that anymore, so I am trying to pickup on Access.
    If you want to switch your process to use Access then you need to change your paradigm about how it works. The way you are trying to use it is pretty far off from how it is designed to be used and there is probably a much better way to do it. You said you ordered a book on Access programming but I would also spend a lot of time understanding database design and normalization. There are tons of youtube videos on this if you aren't already taking advantage of those.

    I am far from an expert with access myself, but I remember going through the same process of trying to treat Access as if it were Excel. The way databases work goes against what people are usually used to for managing data.

    My recommendation: Keep learning Access, study normalization, and play around with some different designs until you have an understanding of how access should be used. Once you have that figured out, THEN work to put together a database for your company. Point being..I feel like you are trying to solve your problem before you understand the tool you are using to solve it.

  2. #17
    dluga20 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    23
    Quote Originally Posted by Locke_Valken View Post
    However, this "("tbl" & <Name Of Your ComboBox>)" really seems to give some ideas for both creating tables via a form and possibly generating the fields via a user's form input. Of course that's beyond the current scope, but something i really want to think about because i don't think that a DB should have to be constantly altered manually like that.
    Did you try the code I posted? It should not create tables from the form. It will only add records (rows) to existing tables...

  3. #18
    Locke_Valken is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Sep 2016
    Posts
    8
    Quote Originally Posted by dluga20 View Post
    Did you try the code I posted? It should not create tables from the form. It will only add records (rows) to existing tables...
    It gives an error because the drop down is pulling the "ID" as the value and not the "text" that correlates with the table name.

    With "Heads" selected in the drop down it will return a "1" instead of "Heads", this code sets the table to "tbl1" instead of "tblHeads". I really cant imagine that setting up an if statement here would be the most efficient solution for this, but that could be done as well, no?

    Set rs = db.OpenRecordset("tbl" & <Name Of Your ComboBox>.Value)

    Did I miss something setting up that table or will a drop down always return the ID as .value?

    Edit: After looking into .value and how it works, I had the wrong idea about how these fields/controls worked. I also just realized there is a different between both controls and fields .

    It is a very simple table with 2 fields:

    ID Type Name
    1 Heads
    2
    Liners
    3
    Rods
    4
    Bonnets
    5
    Pumps
    etc etc

    ok, that was easy... ".text" solved that... but have to research "setting focus"

    Ok, so it works! Amazing
    Code:
    Private Sub btnSubmittoDB_Click()    
        Set db = CurrentDb
        Me.drdType.SetFocus
        Set rs = db.OpenRecordset("tbl" & drdType.Text)
    
    
        For i = 1 To Me.txtQuantity.Value
        rs.AddNew
        rs.Update
    Next
    
    
        MsgBox ("You are submitting " & txtQuantity & " to Pending Inspections for the " & drdType.Text & " Queue.")
    
    
    End Sub

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Best Practice Guidance
    By dpick in forum Access
    Replies: 2
    Last Post: 02-26-2016, 02:25 PM
  2. Need a bit of guidance
    By pipermac in forum Access
    Replies: 3
    Last Post: 10-14-2014, 08:18 AM
  3. Need Advice / Guidance
    By ETCallHome in forum Access
    Replies: 5
    Last Post: 03-24-2014, 09:55 AM
  4. Need some general guidance
    By akrasodomski in forum Access
    Replies: 2
    Last Post: 04-13-2012, 05:54 AM
  5. Need guidance on database
    By yak600 in forum Access
    Replies: 0
    Last Post: 08-04-2009, 07:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums