Results 1 to 3 of 3
  1. #1
    MCCDOM is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    28

    Not all values being copied across to table.


    Hi there,

    I am having a little trouble copying all the values from a combobox row to a table. It seems to miss out the last two columns but copies the first two across fine. Why is this, is there a limitation to how much can be copied from one row of a combobox?

    The code I am using is:
    Code:
    CurrentDb.Execute "INSERT INTO tblAllocated (StockID, Item, Make, Model, FirstName, LastName, OfficeName) VALUES ('" & Me.cboStockID.Column(0) & "','" & Me.cboStockID.Column(1) & "','" & Me.cboStockID.Column(2) & "','" & Me.cboStockID.Column(3) & "','" & Me.cboName.Column(1) & "','" & Me.cboName.Column(2) & "','" & Me.cboOffice & "')"
    The StockID column 0 and 1 are copied to the table fine but columns 2 and 3 are left blank on the table.

    The combobox is unbound and uses rowsource to select the 4 data values (StockID, Item, Make and Model).

    Your help resolving this would be very much appreciated.

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Are you sure the Column Count for the Combo is 4 ?

  3. #3
    MCCDOM is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    28
    Thanks, I completely overlooked that. Column count was set to 1 so changed it to 4 and set the last 3 column widths to 0cm.

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

Similar Threads

  1. Copied Report Malfunctioning
    By DragonTech in forum Reports
    Replies: 2
    Last Post: 06-23-2014, 10:12 AM
  2. Replies: 3
    Last Post: 05-09-2012, 10:53 AM
  3. Copied Database doesn't function
    By larrydwilliams in forum Database Design
    Replies: 9
    Last Post: 02-08-2012, 10:07 AM
  4. Replies: 0
    Last Post: 07-26-2011, 02:03 PM
  5. Replies: 34
    Last Post: 05-19-2011, 06:29 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