Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    cwwaicw311 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    75
    Hi,



    There is a problem, I cant seem to find out wat is causing it. I hope you could help me locate the problem.

    Each Item type have their own part number. In this database there are 3 type of item as you would notice in the database.

    In order to notice the problem:
    1. For example, u choose Lead Frame TPMS and another form open. Then u try to choose the Part Number, there would be 2 part number, if u try to choose the second part number you could notice an error as i would oni display the first part number oni.
    2. When u save the 1. transaction. Then go to the transaction table then u would see that the part number in the transaction table would be different from wat u choose in the form.

    I just do not understand wat is happening as the relationship is correct and the requery part is correct as they still show the correct part number for each of the item.

    Attached is the latest database after editing it with your coding for the saving.

  2. #17
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    The problem was that the PartNumber is Column No 2 in the query of the RowSource of PartNumber Combo while the combobox is bound to Column1. Thus the problem was occuring. More over the PartNumber Field Type has to be set to Number in all the tables.



    Private Sub Done_Click()
    Set rs = CurrentDb.OpenRecordset("TransactionTable")
    rs.AddNew
    rs!Date = Me.Date
    rs!Quantity = Me.Quantity
    rs!Remark = Me.Problem
    rs!PartID = PartNumber.Column(2)
    rs!ItemID = Me.ItemType
    rs!OperatorID = Me.OperatorID
    rs.Update
    rs.Close
    Set rs = Nothing

    MsgBox "Transaction Saved", vbInformation
    DoCmd.Close
    End Sub

    attaching mdb for reference. If this solves your problem let me know.

  3. #18
    cwwaicw311 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    75
    Hi,

    The problem is solved. Thank

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

Similar Threads

  1. VBA Code for working with IE
    By smikkelsen in forum Programming
    Replies: 3
    Last Post: 04-15-2010, 01:05 AM
  2. Access 2003 code vs Access 2007 Code
    By ralphjramirez in forum Access
    Replies: 5
    Last Post: 11-23-2009, 12:33 PM
  3. Replies: 4
    Last Post: 05-12-2009, 01:50 PM
  4. Why isn't this working?
    By adiecidue in forum Queries
    Replies: 4
    Last Post: 04-27-2009, 10:29 AM
  5. Simple Nav Form Code Not Working
    By alsoto in forum Forms
    Replies: 10
    Last Post: 04-10-2009, 09:30 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