Results 1 to 5 of 5
  1. #1
    Dukie is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2012
    Location
    Ontario Canada
    Posts
    3

    Work order form to populate Table

    Hi there and hope someone can help me. I know I’m doing something wrong with my database.
    I’m using access 2013 on a laptop with op system 8.1.
    I have a table that holds inventory data, and a form that uses a combo box to use that data to partialy populate my Work order form. [in my working database, I’m currently using combo boxes to fill in each individual form field and it’s taking a long time] Getting the work order form to populate is working well, again thanks to all of you on this forum.

    What I need to do is populate the work order table from the unbound fields on the work order form.
    I’ve tried a few good ideas from this forum, followed a few web pages with good info and it’s not populating.
    In my work order form, since the fields are unbound, in the event, after update I’ve tried :
    Me.TextBox1 = Me.Combo118.column(3)


    Me.combo118 = Me.Combo118.column(3)
    Me.combo118 = Me.Combo118.column(3) «Expr» [Work order Table]![Make] [using the builder]
    Me.combo118 = [Make]
    =[Me].[combo118]=[Make]
    Me!Make = Me.Combo118.Column(3) (tks June7)

    none of the above worked so far.

    i've attached a copy of what i'm playing with.

    Can someone please help.

    And thanks in advance.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Main problem is you are putting the code directly in the property. That does not work. If you want to use VBA, select [Event Procedure], click the ellipsis (...) to open the VBA editor. Type code in the procedure.

    Next problem is using the wrong control AfterUpdate. Use the AfterUpdate of the combobox. However, the combobox is not working. Why is Tag# field in work order table set to allow multiple values?

    Why do you need to duplicate data?

    Advise no spaces or special characters/punctuation (underscore is exception) in naming convention.

    Also advise no lookups set in table, especially if the lookup has alias: http://access.mvps.org/access/lookupfields.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dukie is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2012
    Location
    Ontario Canada
    Posts
    3
    tks again june7.

    I've read http://access.mvps.org/access/lookupfields.htm this several times in the past, really don't understand it fully other than a little more today with your help. And what i'm attempting shouldn't work.

    You've asked "Why do you need to duplicate data?" and to be honest, i always thought that info generated from a form was supposed to be stored in a table. Otherwise, i really dont' have any idea. In my working database i use daily, i use a query that gives me info on weekly basis, after i run the correct dates of course, and from there i schedule the maintenance needed for the techs for the following week. Some of the work orders will produce purchase orders [parts] and i have it tied in with our parts inventory control as well.

    I did however follow along with the
    VBA exercise, select [Event Procedure], click the ellipsis (...) to open the VBA editor.

    Option Compare DatabasePrivate Sub Combo123_AfterUpdate()
    Me!Make = Me.Combo123.Column(3)
    End Sub
    Private Sub Make_DblClick(Cancel As Integer)
    End Sub

    Ran the form by selecting the tag from the combo box, [after i removed the relationship in the earlier version], the debugger popped up with a runtime errror # 2448 saying i can't assign a value to this object. Something i've done incorrectly again, really, i clearly don't know what i'm doing with VBA either. More then willing to learn.

    I think it's a tough job for anyone to help or, diagnose sometimes when others are trying to do without having all the info. And, really appreciate your help again. Guess i should have asked if it was possible after i populate the form to carry on using that data first and not waste anyone's time.

    Dukie

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Each record in Equipment table has a unique ID. Save the ID to WorkOrder table with additional info for date, task, technician, and any other info specific to the work order.

    Then when you want to view the equipment info related to the ID saved in WorkOrder table, build a query that joins the two tables linked on the common ID field.

    This is basic principle of relational database - not duplicate data.

    Give the Make textbox a name different from the field, like: tbxMake. Then try the code I suggested to populate the field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Dukie is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2012
    Location
    Ontario Canada
    Posts
    3
    Tks AGain June 7. I'm going to try that in the next day or so.

    Dukie

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Order by Weekday in Table and Form
    By kazaccess in forum Access
    Replies: 3
    Last Post: 12-30-2013, 09:39 AM
  2. Vehicle work order database design
    By bacanter01 in forum Database Design
    Replies: 4
    Last Post: 03-22-2012, 07:58 PM
  3. Replies: 1
    Last Post: 04-13-2011, 11:14 AM
  4. Generate Sum from a work center and order #
    By KrenzyRyan in forum Programming
    Replies: 2
    Last Post: 01-19-2011, 09:51 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