Problem with duplicating two combo boxes from another form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matt753
    New Member
    • May 2010
    • 91

    Problem with duplicating two combo boxes from another form

    I am trying to move the location of two combo boxes to a different form, but it is not working very well. the two combo boxes are cmbEmployeeID and cmdPerformance. I am trying to move them to a subform that pops up from another form.

    I copied everything exactly, the row source is exactly the same, and I added the reference in the forms Record Source. (seen below)

    cmbPerformance RowSource
    Code:
    SELECT STAT_Performance_LT.PerformanceID, STAT_Performance_LT.Description FROM STAT_Performance_LT ORDER BY [PerformanceID];
    cmdEmployee RowSource
    Code:
    SELECT qryActiveEmployees.EmployeeID, qryActiveEmployees.Name FROM qryActiveEmployees ORDER BY qryActiveEmployees.Name;
    Forms Record Source Property
    Code:
    SELECT STAT_Orders.EmployeeID, STAT_Orders.PerformanceID, Shippers.Name, Orders.OrderID, Orders.ShippedDate, Orders.RequiredDate, Orders.ApprovedByEG, Orders.ApprovedByBB, Orders.ShipTrackNum, Orders.ShippedInvoice, Orders.ShipperID, Orders.InvoicePrinted, Orders.PackageSize, Orders.ShippedBy, Orders.FilledBy, Orders.ShipComments, Orders.PrePaid, Orders.Collect, Orders.Freight, Orders.Subtotal, Orders.GSTCharge, Orders.PSTCharge, Orders.HSTCharge, Orders.CustomerID, Orders.OrderDate, Orders.TechAssigned FROM Shippers RIGHT JOIN (Employees RIGHT JOIN Orders ON (Employees.EmployeeID=Orders.ShippedBy) AND (Employees.EmployeeID=Orders.FilledBy)) ON Shippers.ShipperID=Orders.ShipperID;
    The comboboxes are showing up fine, but I cant click on any of the items


    Anyone have any ideas whats wrong/what I am missing?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Possible causes:
    1. Combobox control is Locked
    2. AllowEdits on popup form is set to No/False
    3. Popup form is based on a Query that is Read-Only

    If the 'subform' is an actual subform (it sounds more like it's simply a form being opened from another form, which does not constitue a 'subform') the main form being Read-Only would also cause the problem.

    Linq ;0)>

    Comment

    • matt753
      New Member
      • May 2010
      • 91

      #3
      You're right, its a popup not an actual subform.

      The combobox isnt locked, the AllowEdits is Yes, and the form is based off.


      Here is the code for the RecordSource of the form if it helps. The STAT_Orders.Emp loyeeID and STAT_Orders.Per formanceID are where I am getting the values for the two comboboxes
      Code:
      SELECT STAT_Orders.EmployeeID, STAT_Orders.PerformanceID, Shippers.Name, Orders.OrderID, Orders.ShippedDate, Orders.RequiredDate, Orders.ApprovedByEG, Orders.ApprovedByBB, Orders.ShipTrackNum, Orders.ShippedInvoice, Orders.ShipperID, Orders.InvoicePrinted, Orders.PackageSize, Orders.ShippedBy, Orders.FilledBy, Orders.ShipComments, Orders.PrePaid, Orders.Collect, Orders.Freight, Orders.Subtotal, Orders.GSTCharge, Orders.PSTCharge, Orders.HSTCharge, Orders.CustomerID, Orders.OrderDate, Orders.TechAssigned FROM Shippers RIGHT JOIN (Employees RIGHT JOIN Orders ON (Employees.EmployeeID=Orders.FilledBy) AND (Employees.EmployeeID=Orders.ShippedBy)) ON Shippers.ShipperID=Orders.ShipperID;

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        A form based on a query that joins three or more tables is almost sure to be Read-Only!

        Have a look at Allen Browne's article as to why this is so and for some possible workarounds:

        List of reasons why a Microsoft Access query will yield non-editable results.


        Linq ;0)>

        Comment

        • matt753
          New Member
          • May 2010
          • 91

          #5
          "It uses JOINs of different directions on multiple tables in the FROM clause. Remove some tables."

          I dont think I can just remove some of the tables, they are there to get other data from for the rest of the form

          Comment

          Working...