Results 1 to 3 of 3
  1. #1
    Join Date
    May 2010
    Posts
    23

    Unanswered: Editing Query Using

    I am trying to build a form to verify a customer order.
    The form will have a subform that, instead of being a form, will actually be a query called "Verify". The query will appear as an object in datasheet view, and allow users to edit the details (quantity, size etc.) of each item ordered.

    I am running into problems here as I try to pass a VBA variable "OrderID" to the query as a parameter. Currently I have the query as an object in Access. I have thought about using DAO, but how would I source a SQL query generated by DAO to appear in datasheet view on the form?

  2. #2
    Join Date
    May 2010
    Posts
    601
    It may be possible to do what you want with enough work.

    The way I would do it it to keep it simple. Use a text box on the main form to hold the order id. I would use a sub form to display the desired record by setting the master/child link fields. No VBA required to display the records in the sub form.

    IMHO, Forms are best for data entry. Why can't you use a sub form?
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I agree. Access has a built in feature that relates the subform to the main form by one or more fields or controls. This would be an ideal application for what you are doing. The main form would be bound the the Orders table and the subform would be bound to the OrderDetails table and the link would be the ORderID field.

    Then when you cycled through your orders the order details would appear below the order.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •