Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    attached forms

    Here are the forms. I have not changed the modifications back yet.

  2. #17
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Put Database back to original condition

    Here are the original queries,forms and tables.
    Attached Files Attached Files

  3. #18
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Sorry, the tables were there! The conversion to v2007 switched on the 'show forms only' option and I missed it. I apologise for any extra work.

    The message is appearing because someone has renamed the products table.

    Click image for larger version. 

Name:	1.jpg 
Views:	9 
Size:	23.1 KB 
ID:	9933

    The row source SQL is looking for a table called Products but all that exists is a table called ProductsNOLONGERUSING.

    I suggest you rename the table or import the properly named table into your db.

    Meanwhile I'll have a look at the original problem.

  4. #19
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Yes, I renamed the Products table while beta testing but this caused a major problem. I also created a new table to replace the Products table named TProductsSubTable for the subform AddProductsSub. So I now have the original forms AddProducts and AddProductsSubform and the newly created forms AddProductsNEW and AddProductsSubformNEW. The subform TimeCardCatAndProdSub still uses the original Orders table. Maybe if I knew how to change the sql code, I could point it to the new table named TProductSubTable. Thanks Rod, I hope I have explained things well enough for you to take a look at. When you click on the subform on the TimeCards form and choose a quantity, then when you choose a category, this is where the lookup code fires. In design mode click on Category which has a name of Cat, it is a combo and take a look at the after update event code.

    In theory I should be able to use my newly created form FProductMultiItemSelect and then make the append query add the PRODUCTS selected to the form. I suppose I could try and use a set value macro as well. ???

  5. #20
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    SELECT Products.[Product Name], Products.[Unit Price], Products.[Category ID] FROM Products WHERE (((Products.[Category ID])=[Cat])) ORDER BY Products.[Product Name];

    For the particular SQL that caused you problems, the table name is highlighted in red, the table field names are highlighted in blue and the remaining '[Cat]' is the name of the control on the form.

    Where to find it?

    Click image for larger version. 

Name:	1.jpg 
Views:	3 
Size:	31.3 KB 
ID:	9943

    Go to the Data tab in the Property Sheet in the design view of the subform. Row Source contains the SQL. If you want to edit the SQL in a new window, select it and press Shift+F2.

    PS Will investigate the rest of your post later.

  6. #21
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Thanks, I reverted back to my original code, table and forms.

  7. #22
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    Nothing wrong with the concept except there's a typo: the table is catalogued with the name, TProductSubTable, whereas the SQL refers to TProductsSubTable.

    Also the SQl switches between TProductsSubTable and Products. Is this what you want?

  8. #23
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Maybe it is just me, but it works fine the way it is. Anyway, I don't have enough code experience to fix it if I make any changes. The db works the way it is except for the fact that I can only add items one at a time. This is my last hurdle I think!

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

Similar Threads

  1. Searching by field on subform on main form
    By helen21112010 in forum Forms
    Replies: 1
    Last Post: 10-16-2012, 07:55 AM
  2. Replies: 3
    Last Post: 01-05-2012, 07:15 PM
  3. Replies: 9
    Last Post: 12-15-2010, 01:44 PM
  4. Replies: 1
    Last Post: 11-13-2010, 12:57 PM
  5. Replies: 3
    Last Post: 11-05-2010, 03:10 PM

Tags for this Thread

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