Share via

Order Form Question

Anonymous
2024-01-25T16:53:24+00:00

I have been watching videos by Computer Learning Zone. I am building an order form very similar to this image

I know how to build the order form with the product section in blue. I don't know how to add the dropdown box in red with the add button, so when you choose an item and click add, it adds it to the blue section (order details).

I have watched quite a few of his videos, but can't seem to find any that show how this part was done.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2024-01-26T14:37:35+00:00

Why  do you need the additional combo box at all?  You can simply allow additions in the subform, and select a product in the empty bottom row in the subform when you want to add a further product to the order.

You might like to take a look at DatabaseBasics.zip in my public databases folder at:

https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

In the section on 'entering data via a form/subforms' in this little demo file, the third form in this section is a simple orders form/subform set up in this way.

If you do use a separate unbound combo box you could build and execute an INSERT INTO  statement in the unbound combo box's AfterUpdate event procedure, and then requery the subform control to show the new item.  However, this would undermine the integrity of the database as you would need to allow NULL in the Qty column in the OrderDetails table, or give it a default value of zero.  By entering a new row directly in the subform you would normally disallow NULL in this column by setting the Required property to True (Yes) in table design view, and use the ValidationRule property to force a value of 1 or more.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. George Hepworth 22,855 Reputation points Volunteer Moderator
    2024-01-25T19:05:39+00:00

    The problem is that anyone else would have to obtain the same accdb as the one you have in order to examine how it is supposed to work.

    We could try to offer generic approaches, but that may or may not match what Richard did for his demo.

    If it matched, you'd be helped. If we guessed wrong and offered something that didn't correspond to his design, you'd actually be hindered by the false start.

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2024-01-25T19:03:28+00:00

    First I would recommend you look at the new Northwinds sample which is also and order entry system and more.

    Second, please explain what the drop down inn red is for. Only with understanding as to what it is used for can we help.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-01-25T17:53:27+00:00

    I have signed up as a student, but that can take two days to just get in. Then it's the time to get the answer. I was hoping this was a simple thing I can work on today. I assume that it is taking a record from the product list and adding it to the order details record. I was more curious about the coding on the "add" button.

    Was this answer helpful?

    0 comments No comments
  4. George Hepworth 22,855 Reputation points Volunteer Moderator
    2024-01-25T17:46:06+00:00

    Was this answer helpful?

    0 comments No comments